source: trunk/grails-app/domain/dbnp/authentication/SecRole.groovy @ 1430

Last change on this file since 1430 was 1430, checked in by work@…, 10 years ago
  • set keyword expansion
  • Property svn:keywords set to Rev Author Date
File size: 425 bytes
Line 
1package dbnp.authentication
2
3class SecRole implements Serializable {
4
5        String authority
6
7        static mapping = {
8                cache true
9        }
10
11        static constraints = {
12                authority blank: false, unique: true
13        }
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        }
23}
Note: See TracBrowser for help on using the repository browser.