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

Last change on this file since 1159 was 1159, checked in by robert@…, 10 years ago

Improved the template editor so that template fields can be removed from templates, even if the templates are in use, but only if the template fields are never filled. (see ticket #74)

Also changed the user registration so that the administrator confirmation mails will be sent to the administrators in production environment, but still to gscfproject@… in other environments.

File size: 401 bytes
Line 
1package dbnp.authentication
2
3class SecRole {
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.