Ignore:
Timestamp:
Apr 25, 2012, 10:42:52 PM (10 years ago)
Author:
work@…
Message:
  • changed application wide secret into a user specific api key which is automatically generated when a user is created. The key is available in the user's profile or through the user administration pages
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/grails-app/views/user/edit.gsp

    r2084 r2225  
    33        <g:set var="entityName" value="${message(code: 'user.label', default: 'User')}"/>
    44        <title><g:message code="default.edit.label" args="[entityName]"/></title>
    5 
    6         <script type="text/javascript">
    7                 // This method is called on the event body.onLoad
    8                 $(function() {
    9                         $("#tabs").tabs();
    10                 });
    11         </script>
     5    <link rel="stylesheet" href="${resource(dir: 'css', file: 'tipTip.css')}"/>
     6    <script type="text/javascript" src="${resource(dir: 'js', file: 'jquery.tipTip.minified.js')}"></script>
     7    <script type="text/javascript">
     8        $(document).ready(function() {
     9            $(".tooltip").tipTip();
     10            $("#tabs").tabs();
     11        });
     12    </script>
    1213        <style type="text/css">
    1314        div.usermanagement {
     
    4546                                <g:if test="${user.shibbolethUser}">
    4647                                        <tr><td>Shibboleth user</td><td>yes</td></tr>
    47                                         <tr><td>Username/Urn</td><td>${user?.username}</td></tr>
     48                    <tr>
     49                        <td>API key</td>
     50                        <td valign="top" class="value">
     51                            <g:textField disabled="disabled" name="secret" value="${user.apiKey}" style="width:250px" />
     52                            <img src="${fam.icon(name: 'help')}" class="tooltip" title="in order to programmatically interface with gscf, a user needs his api key to communicate with the api. Refer to the api documentation at ${createLink(controller:'api')} for more information about how to use the api and the api key." />
     53                        </td>
     54                    </tr>
     55                    <tr><td>Username/Urn</td><td>${user?.username}</td></tr>
    4856                                        <tr><td>Uid</td><td>${user?.uid}</td></tr>
    4957                                        <tr><td>Email address</td><td><g:textField name="email" value="${user?.email}"/></td></tr>
     
    5462                                <g:else>
    5563                                        <tr><td>Shibboleth user</td><td>no</td></tr>
    56                                         <tr><td>Username</td><td><g:textField name="username" value="${user?.username}"/></td></tr>
     64                    <tr>
     65                        <td>API key</td>
     66                        <td valign="top" class="value">
     67                            <g:textField disabled="disabled" name="secret" value="${user.apiKey}" style="width:250px" />
     68                            <img src="${fam.icon(name: 'help')}" class="tooltip" title="in order to programmatically interface with gscf, a user needs his api key to communicate with the api. Refer to the api documentation at ${createLink(controller:'api')} for more information about how to use the api and the api key." />
     69                        </td>
     70                    </tr>
     71                    <tr><td>Username</td><td><g:textField name="username" value="${user?.username}"/></td></tr>
    5772                                        <tr><td>Password</td><td><g:passwordField name="password" value="${user?.password}"/></td></tr>
    5873                                        <tr><td>Email address</td><td><g:textField name="email" value="${user?.email}"/></td></tr>
Note: See TracChangeset for help on using the changeset viewer.