|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.apache.turbine.util.security.AccessControlList
This is a control class that makes it easy to find out if a particular User has a given Permission. It also determines if a User has a a particular Role.
Field Summary | |
private java.util.Map |
permissionSets
The sets of permissions that the user has in different groups |
private java.util.Map |
roleSets
The sets of roles that the user has in different groups |
static java.lang.String |
SESSION_KEY
|
Constructor Summary | |
AccessControlList(java.util.Map roleSets,
java.util.Map permissionSets)
Constructs a new AccessControlList. |
Method Summary | |
Group[] |
getAllGroups()
Returns all groups definded in the system. |
PermissionSet |
getPermissions()
Retrieves a set of Permissions an user is assigned in the global Group. |
PermissionSet |
getPermissions(Group group)
Retrieves a set of Permissions an user is assigned in a Group. |
RoleSet |
getRoles()
Retrieves a set of Roles an user is assigned in the global Group. |
RoleSet |
getRoles(Group group)
Retrieves a set of Roles an user is assigned in a Group. |
boolean |
hasPermission(Permission permission)
Checks if the user is assigned a specific Permission in the global Group. |
boolean |
hasPermission(Permission permission,
Group group)
Checks if the user is assigned a specific Permission in the Group. |
boolean |
hasPermission(Permission permission,
GroupSet groupset)
Checks if the user is assigned a specific Permission in any of the given Groups |
boolean |
hasPermission(java.lang.String permission)
Checks if the user is assigned a specific Permission in the global Group. |
boolean |
hasPermission(java.lang.String permission,
Group group)
Checks if the user is assigned a specific Permission in the Group. |
boolean |
hasPermission(java.lang.String permissionName,
GroupSet groupset)
Checks if the user is assigned a specifie Permission in any of the given Groups |
boolean |
hasPermission(java.lang.String permission,
java.lang.String group)
Checks if the user is assigned a specific Permission in the Group. |
boolean |
hasRole(Role role)
Checks if the user is assigned a specific Role in the global Group. |
boolean |
hasRole(Role role,
Group group)
Checks if the user is assigned a specific Role in the Group. |
boolean |
hasRole(Role role,
GroupSet groupset)
Checks if the user is assigned a specific Role in any of the given Groups |
boolean |
hasRole(java.lang.String role)
Checks if the user is assigned a specific Role in the global Group. |
boolean |
hasRole(java.lang.String rolename,
GroupSet groupset)
Checks if the user is assigned a specifie Role in any of the given Groups |
boolean |
hasRole(java.lang.String role,
java.lang.String group)
Checks if the user is assigned a specific Role in the Group. |
Methods inherited from class java.lang.Object |
|
Field Detail |
private java.util.Map roleSets
private java.util.Map permissionSets
public static java.lang.String SESSION_KEY
Constructor Detail |
public AccessControlList(java.util.Map roleSets, java.util.Map permissionSets)
roleSets
- a hashtable containing RoleSet objects keyed with Group objectspermissionSets
- a hashtable containing PermissionSet objects keyed with Group objectsMethod Detail |
public RoleSet getRoles(Group group)
group
- the Grouppublic RoleSet getRoles()
group
- the Grouppublic PermissionSet getPermissions(Group group)
group
- the Grouppublic PermissionSet getPermissions()
group
- the Grouppublic boolean hasRole(Role role, Group group)
role
- the Rolegroup
- the Grouptrue
if the user is assigned the Role in the Group.public boolean hasRole(Role role, GroupSet groupset)
role
- the Rolegroupset
- a Groupsettrue
if the user is assigned the Role in any of
the given Groups.public boolean hasRole(java.lang.String role, java.lang.String group)
role
- the Rolegroup
- the Grouptrue
if the user is assigned the Role in the Group.public boolean hasRole(java.lang.String rolename, GroupSet groupset)
rolename
- the name of the Rolegroupset
- a Groupsettrue
if the user is assigned the Role in any of
the given Groups.public boolean hasRole(Role role)
role
- the Rolegroup
- the Grouptrue
if the user is assigned the Role in the global Group.public boolean hasRole(java.lang.String role)
role
- the Rolegroup
- the Grouptrue
if the user is assigned the Role in the global Group.public boolean hasPermission(Permission permission, Group group)
permission
- the Permissiongroup
- the Grouptrue
if the user is assigned the Permission in the Group.public boolean hasPermission(Permission permission, GroupSet groupset)
permission
- the Permissiongroupset
- a Groupsettrue
if the user is assigned the Permission in any
of the given Groups.public boolean hasPermission(java.lang.String permission, java.lang.String group)
permission
- the Permissiongroup
- the Grouptrue
if the user is assigned the Permission in the Group.public boolean hasPermission(java.lang.String permission, Group group)
permission
- the Permissiongroup
- the Grouptrue
if the user is assigned the Permission in the Group.public boolean hasPermission(java.lang.String permissionName, GroupSet groupset)
permissionName
- the name of the Permissiongroupset
- a Groupsettrue
if the user is assigned the Permission in any
of the given Groups.public boolean hasPermission(Permission permission)
permission
- the Permissiongroup
- the Grouptrue
if the user is assigned the Permission in the global Group.public boolean hasPermission(java.lang.String permission)
permission
- the Permissiongroup
- the Grouptrue
if the user is assigned the Permission in the global Group.public Group[] getAllGroups()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |