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:

  1. changing<security:intercept-url pattern="/admin" access="hasrole('admin')" /> <security:intercept-url pattern="/admin" access="hasrole('role_admin')" />
  2. updating(changing) database authorities table [authority] coloumn [admin] value [role_admin]
  3. update maven project ...... worked form. thank all

Comments

Popular posts from this blog

sublimetext3 - what keyboard shortcut is to comment/uncomment for this script tag in sublime -

java - No use of nillable="0" in SOAP Webservice -

ubuntu - Laravel 5.2 quickstart guide gives Not Found Error -