Last change
on this file since 1430 was
1430,
checked in by work@…, 10 years ago
|
|
-
Property svn:keywords set to
Rev Author Date
|
File size:
425 bytes
|
Rev | Line | |
---|
[976] | 1 | package dbnp.authentication |
---|
| 2 | |
---|
[1222] | 3 | class SecRole implements Serializable { |
---|
[976] | 4 | |
---|
| 5 | String authority |
---|
| 6 | |
---|
| 7 | static mapping = { |
---|
| 8 | cache true |
---|
| 9 | } |
---|
| 10 | |
---|
| 11 | static constraints = { |
---|
| 12 | authority blank: false, unique: true |
---|
| 13 | } |
---|
[1159] | 14 | |
---|
| 15 | static List<SecUser> findUsers(String authority) { |
---|
| 16 | def userRoles = SecUserSecRole.findAllBySecRole( SecRole.findByAuthority( authority ) ); |
---|
| 17 | |
---|
| 18 | def users = []; |
---|
| 19 | userRoles.each { users.add( it.secUser ) } |
---|
| 20 | |
---|
| 21 | return users |
---|
| 22 | } |
---|
[976] | 23 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.