Grails Spring Security Core: Get users with specific ROLE -
i'm trying user
s follow criteria , have role_user
.
criteria:
arraylist<user> users = user.createcriteria().list() { inlist("gender", whichgenderlist) ne("uid", uid) profile { inlist("age", whichage) } firstresult(usersperpage * currentpage) maxresults(usersperpage) }
question: possible add criteria condition select users role_user
?
i'm using:
- grails 2.4.4
- spring security core 2.0-rc4
update:
minimal user
table:
role
table:
userrole
table:
arraylist<user> users = user.createcriteria().list() { inlist("gender", whichgenderlist) ne("uid", uid) role { eq("authority","role_user") } profile { inlist("age", whichage) } firstresult(usersperpage * currentpage) maxresults(usersperpage) }
Comments
Post a Comment