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_adminfrom 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

Popular posts from this blog

Fail to load namespace Spring Security http://www.springframework.org/security/tags -

sql - MySQL query optimization using coalesce -

unity3d - Unity local avoidance in user created world -