spring mvc - @PreAuthorize Does not restrict user from Access Controller Action -
using grails spring security , spring security acl. have controller:
class admincompanycontroller { @preauthorize("hasrole('role_admin')") def create() { println("create") [company: new company()] } }
even user has role role_user
can access create()
action.
i know can spring security annotation @secured
want acl.
how prevent user not have role_admin
from access create()
action using acl?
edit: use grails 2.4.5 and
compile ":spring-security-core:2.0-rc5" runtime ':spring-security-acl:2.0-rc2'
@preauthorize has used in services. in controllers have stay @secured.
Comments
Post a Comment