Changeset 166
- Timestamp:
- Oct 26, 2009, 3:11:18 PM (15 years ago)
- Location:
- trunk/grails-app
- Files:
-
- 10 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/grails-app/controllers/LoginController.groovy
r73 r166 144 144 def username = session[AuthenticationProcessingFilter.SPRING_SECURITY_LAST_USERNAME_KEY] 145 145 def msg = '' 146 def person = Person.findByLoginName(username) 146 147 def exception = session[AbstractProcessingFilter.SPRING_SECURITY_LAST_EXCEPTION_KEY] 147 148 if (exception) { … … 149 150 msg = "[$username] is disabled." 150 151 } 152 else if (person.authorities.isEmpty()) { 153 msg = "[$username] has no GrantedAuthority." 154 } 151 155 else { 152 156 msg = "[$username] wrong username/password." -
trunk/grails-app/controllers/PersonGroupController.groovy
r122 r166 27 27 if(personGroupInstance) { 28 28 try { 29 personGroupInstance.delete( )29 personGroupInstance.delete(flush:true) 30 30 flash.message = "PersonGroup ${params.id} deleted" 31 31 redirect(action:list) … … 77 77 else { 78 78 flash.message = "PersonGroup not found with id ${params.id}" 79 redirect(action: edit,id:params.id)79 redirect(action:list) 80 80 } 81 81 } -
trunk/grails-app/domain/Person.groovy
r164 r166 7 7 tasks: Task] 8 8 9 static belongsTo = [Authority , PersonGroup]9 static belongsTo = [Authority] 10 10 11 11 Department department -
trunk/grails-app/domain/PersonGroup.groovy
r59 r166 6 6 7 7 static hasMany = [persons : Person] 8 9 static belongsTo = [Person] 8 10 9 11 static constraints = { -
trunk/grails-app/i18n/messages.properties
r155 r166 2 2 person.pass.blank=Password cannot be blank 3 3 person.pass.doesNotMatch=Passwords must match 4 5 person.personGroups=Person Groups 6 person.personGroups.help=Groups provide no application authorisations and are merely for grouping people for information purposes. Use Ctrl or Shift to select multiple groups. 7 person.loginName=Login Name 8 person.loginName.help=This is the id or name that the person will use to login to the application. 9 person.firstName=First Name 10 person.firstName.help=The person's real first name. 11 person.lastName=Last Name 12 person.lastName.help=The person's real last name. 13 person.password=Password 14 person.password.help=The password that the person will use to login to the appllication (should be changed by them later). 15 person.isActive=Active 16 person.isActive.help=Disable this to prevent a person logging in to the application. 17 18 person.authorities=Authorities 19 person.authorities.help=To allow login at least the 'ROLE_AppUser' authority must be given. The 'ROLE_AppAdmin' authority is NOT required for daily use and provides full (read as DANGEROUS) access. 4 20 5 21 entry.duration=Duration … … 21 37 task.leadPerson=Lead Person 22 38 task.leadPerson.help=The primay contact person. 23 39 24 40 taskRecurring.startDate.NotInTheFuture=Please select a start date that is not in the past, or use original date. 25 41 taskRecurring.startDate=Start Date 26 42 taskRecurring.startDate.help=The tartget start date for the first auto generated subTask. 43 44 task.primaryAsset=Primary Asset 45 task.primaryAsset.help=This is the asset that costs will be assigned to. 46 task.associatedAssets=Associated Assets 47 task.associatedAssets.help=These assets are to be associated with this task, but costs will not be assigned. 27 48 28 49 default.doesnt.match.message=Property [{0}] of class [{1}] with value [{2}] does not match the required pattern [{3}] -
trunk/grails-app/views/person/create.gsp
r164 r166 32 32 <td valign="top" class="value ${hasErrors(bean:person,field:'loginName','errors')}"> 33 33 <input type="text" id="loginName" name="loginName" value="${person.loginName?.encodeAsHTML()}"/> 34 <g:helpBalloon class="helpballoon" code="person.loginName" /> 34 35 </td> 35 36 </tr> … … 39 40 <td valign="top" class="value ${hasErrors(bean:person,field:'firstName','errors')}"> 40 41 <input type="text" id="firstName" name="firstName" value="${person.firstName?.encodeAsHTML()}"/> 42 <g:helpBalloon class="helpballoon" code="person.firstName" /> 41 43 </td> 42 44 </tr> … … 46 48 <td valign="top" class="value ${hasErrors(bean:person,field:'lastName','errors')}"> 47 49 <input type="text" id="lastName" name="lastName" value="${person.lastName?.encodeAsHTML()}"/> 50 <g:helpBalloon class="helpballoon" code="person.lastName" /> 48 51 </td> 49 52 </tr> … … 54 57 <td valign="top" class="value ${hasErrors(bean:person,field:'pass','errors')}"> 55 58 <input type="password" id="pass" name="pass"/> 59 <g:helpBalloon class="helpballoon" code="person.password" /> 56 60 </td> 57 61 </tr> 58 62 59 63 <tr class="prop"> 60 <td valign="top" class="name"><label for="isActive"> isActive:</label></td>64 <td valign="top" class="name"><label for="isActive">Active:</label></td> 61 65 <td valign="top" class="value ${hasErrors(bean:person,field:'isActive','errors')}"> 62 66 <g:checkBox name="isActive" value="${person.isActive}" ></g:checkBox> 67 <g:helpBalloon class="helpballoon" code="person.isActive" /> 63 68 </td> 64 69 </tr> … … 106 111 </td> 107 112 <td valign="top" class="value ${hasErrors(bean:person,field:'personGroups','errors')}"> 108 <g:select name="personGroups"113 <g:select id="personGroups" name="personGroups" 109 114 from="${PersonGroup.list()}" 110 size="5" multiple="yes" optionKey="id"111 value="${person?.personGroups }"/>112 115 optionKey="id" size="5" multiple="yes" 116 value="${person?.personGroups?.id}" noSelection="['':'--None--']"/> 117 <g:helpBalloon class="helpballoon" code="person.personGroups" /> 113 118 </td> 114 119 </tr> 115 120 116 121 <tr class="prop"> 117 <td valign="top" class="name" align="left">Authorities:</td> 122 <td valign="top" class="name" align="left"> 123 Authorities: 124 </td> 125 <td valign="top" class="name" align="left"> 126 <g:helpBalloon class="helpballoon" code="person.authorities" /> 127 </td> 118 128 </tr> 119 129 … … 121 131 <tr> 122 132 <td valign="top" class="name" align="left">${it.authority.encodeAsHTML()}</td> 123 <td align="left"><g:checkBox name="${it.authority}"/></td> 133 <td align="left"> 134 <g:checkBox name="${it.authority}" value="${it.authority == 'ROLE_AppUser'}"/> 135 </td> 124 136 </tr> 125 137 </g:each> -
trunk/grails-app/views/person/edit.gsp
r164 r166 40 40 <td valign="top" class="value ${hasErrors(bean:person,field:'loginName','errors')}"> 41 41 <input type="text" id="loginName" name="loginName" value="${person.loginName?.encodeAsHTML()}"/> 42 <g:helpBalloon class="helpballoon" code="person.loginName" /> 42 43 </td> 43 44 </tr> … … 47 48 <td valign="top" class="value ${hasErrors(bean:person,field:'firstName','errors')}"> 48 49 <input type="text" id="firstName" name="firstName" value="${person.firstName?.encodeAsHTML()}"/> 50 <g:helpBalloon class="helpballoon" code="person.firstName" /> 49 51 </td> 50 52 </tr> … … 54 56 <td valign="top" class="value ${hasErrors(bean:person,field:'lastName','errors')}"> 55 57 <input type="text" id="lastName" name="lastName" value="${person.lastName?.encodeAsHTML()}"/> 58 <g:helpBalloon class="helpballoon" code="person.lastName" /> 56 59 </td> 57 60 </tr> … … 61 64 <td valign="top" class="value ${hasErrors(bean:person,field:'pass','errors')}"> 62 65 <input type="password" id="pass" name="pass" value="${person.pass?.encodeAsHTML()}"/> 66 <g:helpBalloon class="helpballoon" code="person.password" /> 63 67 </td> 64 68 </tr> 65 69 66 70 <tr class="prop"> 67 <td valign="top" class="name"><label for="isActive"> isActive:</label></td>71 <td valign="top" class="name"><label for="isActive">Active:</label></td> 68 72 <td valign="top" class="value ${hasErrors(bean:person,field:'isActive','errors')}"> 69 73 <g:checkBox name="isActive" value="${person.isActive}"/> 74 <g:helpBalloon class="helpballoon" code="person.isActive" /> 70 75 </td> 71 76 </tr> … … 113 118 </td> 114 119 <td valign="top" class="value ${hasErrors(bean:person,field:'personGroups','errors')}"> 115 <g:select name="personGroups"120 <g:select id="personGroups" name="personGroups" 116 121 from="${PersonGroup.list()}" 117 size="5" multiple="yes" optionKey="id"118 value="${person?.personGroups }"/>119 122 optionKey="id" size="5" multiple="yes" 123 value="${person?.personGroups.id}" noSelection="['':'--None--']"/> 124 <g:helpBalloon class="helpballoon" code="person.personGroups" /> 120 125 </td> 121 126 </tr> 122 127 123 128 <tr class="prop"> 124 <td valign="top" class="name" align="left">Authorities:</td> 129 <td valign="top" class="name" align="left"> 130 Authorities: 131 </td> 132 <td valign="top" class="name" align="left"> 133 <g:helpBalloon class="helpballoon" code="person.authorities" /> 134 </td> 125 135 </tr> 126 136 -
trunk/grails-app/views/person/list.gsp
r156 r166 36 36 <g:sortableColumn property="firstName" title="First Name" params="${filterParams}" /> 37 37 <g:sortableColumn property="lastName" title="Last Name" params="${filterParams}" /> 38 <g:sortableColumn property="isActive " title=" isActive" params="${filterParams}" />38 <g:sortableColumn property="isActive " title="Active" params="${filterParams}" /> 39 39 <th></th> 40 40 </tr> -
trunk/grails-app/views/person/show.gsp
r164 r166 40 40 41 41 <tr class="prop"> 42 <td valign="top" class="name"> isActive:</td>42 <td valign="top" class="name">Active:</td> 43 43 <td valign="top" class="value">${person.isActive}</td> 44 44 </tr> -
trunk/grails-app/views/personGroup/edit.gsp
r151 r166 71 71 </td> 72 72 <td valign="top" class="value ${hasErrors(bean:personGroupInstance,field:'persons','errors')}"> 73 <g:select name="persons" 74 from="${Person.list()}" 75 size="5" multiple="yes" optionKey="id" 76 value="${personGroupInstance?.persons}" /> 77 73 78 74 </td> 79 75 </tr>
Note: See TracChangeset
for help on using the changeset viewer.