def listUsersByRole = {
def users = User.list()
def role = new Role()
def validUsers = []
role.authorityCode = params.rollkod
role.scope = params.orgkod
for (user in users) {
if(user.hasRole(role)) {
validUsers << user
}
}
.... render view etc ...
}
N.B the code above is highlighted with a js/css script solution from http://code.google.com/p/syntaxhighlighter/. I'm seeing some strangeness in Firefox with the nice labels etc. But it looks good enough so I'll keep using it.
0 comments:
Post a Comment