com.atlassian.seraph.auth
Class GroupRoleMapper
java.lang.Object
com.atlassian.seraph.auth.GroupRoleMapper
- All Implemented Interfaces:
- Initable, RoleMapper
- public class GroupRoleMapper
- extends java.lang.Object
- implements RoleMapper
A simple RoleMapper which maps directly between group names and role names.
If a user is a member of someGroup, the are in the 'someGroup' role. Users can log in if they exist.
Method Summary |
boolean |
canLogin(java.security.Principal user,
javax.servlet.http.HttpServletRequest request)
Users can login if they exist. |
boolean |
hasRole(java.security.Principal user,
javax.servlet.http.HttpServletRequest request,
java.lang.String role)
Assume that roles == groups. |
void |
init(java.util.Map params,
SecurityConfig config)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
GroupRoleMapper
public GroupRoleMapper()
init
public void init(java.util.Map params,
SecurityConfig config)
- Specified by:
init
in interface Initable
hasRole
public boolean hasRole(java.security.Principal user,
javax.servlet.http.HttpServletRequest request,
java.lang.String role)
- Assume that roles == groups.
- Specified by:
hasRole
in interface RoleMapper
canLogin
public boolean canLogin(java.security.Principal user,
javax.servlet.http.HttpServletRequest request)
- Users can login if they exist.
- Specified by:
canLogin
in interface RoleMapper
Copyright © 2008 Atlassian Software Systems Pty Ltd. All Rights Reserved.