Closed willzou closed 12 years ago
Please remove 'System.out.println'. Use Inject instead of Autowired for DI with Java CDI standard (JSR-299). Don't implement hasRole in User, use SecurityContextHolderAwareRequestWrapper and add it in SecurityUtils. http://stackoverflow.com/questions/3021200/how-to-check-hasrole-in-java-code-with-spring-security
Please remove changes in regimo-web/src/main/webapp/WEB-INF/config/security-config.xml Jack has committed a better implementation: https://github.com/Polonious/Regimo/pull/28/files#diff-1
NO Eclipse config files! NO target files!
after tomcat restart, run these script before testing
insert into menu (id, label, name) values (nextval('seq_menu'), 'Admin Menu', 'ADMIN'); insert into rolemenu (menuid, roleid) values (1,1); insert into menuitem (id, menuid, name, text, hyperlink) values (nextval('seq_menu'), 1, 'User management','User management', 'user/browse'); insert into menuitem (id, menuid, name, text, hyperlink) values (nextval('seq_menu'), 1, 'dashlet management','dashlet management', 'dashlet/browse'); insert into userrole (userid, roleid) values (1, 1);