Polonious / Regimo

4 stars 6 forks source link

admin menu #23

Closed willzou closed 12 years ago

willzou commented 12 years ago

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);

tedliang commented 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

tedliang commented 12 years ago

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

tedliang commented 12 years ago

NO Eclipse config files! NO target files!