I cannot access /admin page after I configured spring security role as hasRole('admin') -
i learning spring security 4.0.3 , set authenticated admin page as: in [security-contex.xml] page. database user(username, email, enabled, password) , authorities(username, authority). can log , other activities except cannot access admin page?
any 1 knows solution?
the idea trying authorize admin.jsp page has administrator role only.i use xml configuration. follow: facing same error error in spring security hasrole() giving error 403 - access denied having same error same code in link above. [i sorry cannot copy xml file new stackoverflow shows me code formatting error xml fiel. have tried proposed solutions under above link still same.error.
i have solved problems follows:
- changing
<security:intercept-url pattern="/admin" access="hasrole('admin')" />
<security:intercept-url pattern="/admin" access="hasrole('role_admin')" />
- updating(changing) database authorities table [authority] coloumn [admin] value [role_admin]
- update maven project ...... worked form. thank all
Comments
Post a Comment