| | |
| | | |
| | | /* ------------ Rollen ------------------ */ |
| | | |
| | | public UserRole grantRole(String userId, String roleName) { |
| | | UserRole ur = new UserRole(); |
| | | ur.setRole(roleName); |
| | | ur.setUser(userId); |
| | | getDb().insert(ur, UserRoleMapper); |
| | | return ur; |
| | | public UserRole grantRole(UserRole role) { |
| | | getDb().insert(role, UserRoleMapper); |
| | | return role; |
| | | } |
| | | |
| | | public UserRole revokeRole(String userId, String roleName) { |
| | | UserRole ur = new UserRole(); |
| | | ur.setRole(roleName); |
| | | ur.setUser(userId); |
| | | getDb().delete(ur, UserRoleMapper); |
| | | return ur; |
| | | public UserRole revokeRole(UserRole role) { |
| | | getDb().delete(role, UserRoleMapper); |
| | | return role; |
| | | } |
| | | |
| | | public List getRoleNamesGranted() { |