Klasse DynamicAccessControlListImpl
java.lang.Object
org.apache.fulcrum.security.model.dynamic.DynamicAccessControlListImpl
- Alle implementierten Schnittstellen:
Serializable
,AccessControlList
,DynamicAccessControlList
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.
- Version:
- $Id$
- Autor:
- Eric Pugh
- Siehe auch:
-
Konstruktorübersicht
KonstruktorenKonstruktorBeschreibungDynamicAccessControlListImpl
(Map<? extends Group, ? extends RoleSet> roleSets, Map<? extends Role, ? extends PermissionSet> permissionSets) Constructs a new AccessControlList. -
Methodenübersicht
Modifizierer und TypMethodeBeschreibungRetrieves a set of Permissions an user is assigned in the global Group.getPermissions
(Group group) Retrieves a set of Permissions an user is assigned in a Group.getRoles()
Retrieves a set of Roles an user is assigned in the global Group.Retrieves a set of Roles an user is assigned in a Group.boolean
hasPermission
(String permission) Checks if the user is assigned a specific Permission in the global Group.boolean
hasPermission
(String permission, String group) Checks if the user is assigned a specific Permission in the Group.boolean
hasPermission
(String permission, Group group) Checks if the user is assigned a specific Permission in the Group.boolean
hasPermission
(String permissionName, GroupSet groupset) Checks if the user is assigned a specific Permission in any of the given Groupsboolean
hasPermission
(Permission permission) Checks if the user is assigned a specific Permission.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 Groupsboolean
Checks if the user is assigned a specific Role .boolean
Checks if the user is assigned a specific Role in the Group.boolean
Checks if the user is assigned a specific Role in any of the given Groupsboolean
Checks if the user is assigned a specific Roleboolean
Checks if the user is assigned a specific Role in the Group.boolean
Checks if the user is assigned a specific Role in any of the given Groups
-
Konstruktordetails
-
DynamicAccessControlListImpl
public DynamicAccessControlListImpl(Map<? extends Group, ? extends RoleSet> roleSets, Map<? extends Role, ? extends PermissionSet> permissionSets) Constructs a new AccessControlList. This class follows 'immutable' pattern - it's objects can't be modified once they are created. This means that the permissions the users have are in effect form the moment they log in to the moment they log out, and changes made to the security settings in that time are not reflected in the state of this object. If you need to reset an user's permissions you need to invalidate his session.
The objects that constructs an AccessControlList must supply hashtables of role/permission sets keyed with group objects.- Parameter:
roleSets
- a hashtable containing RoleSet objects keyed with Group objectspermissionSets
- a hashtable containing PermissionSet objects keyed with Roles objects
-
-
Methodendetails
-
getRoles
Retrieves a set of Roles an user is assigned in a Group.- Angegeben von:
getRoles
in SchnittstelleDynamicAccessControlList
- Parameter:
group
- the Group- Gibt zurück:
- the set of Roles this user has within the Group.
-
getRoles
Retrieves a set of Roles an user is assigned in the global Group.- Angegeben von:
getRoles
in SchnittstelleDynamicAccessControlList
- Gibt zurück:
- the set of Roles this user has within the global Group.
-
getPermissions
Retrieves a set of Permissions an user is assigned in a Group.- Angegeben von:
getPermissions
in SchnittstelleDynamicAccessControlList
- Parameter:
group
- the Group- Gibt zurück:
- the set of Permissions this user has within the Group.
-
getPermissions
Retrieves a set of Permissions an user is assigned in the global Group.- Angegeben von:
getPermissions
in SchnittstelleDynamicAccessControlList
- Gibt zurück:
- the set of Permissions this user has within the global Group.
-
hasRole
Checks if the user is assigned a specific Role in the Group.- Angegeben von:
hasRole
in SchnittstelleDynamicAccessControlList
- Parameter:
role
- the Rolegroup
- the Group- Gibt zurück:
true
if the user is assigned the Role in the Group.
-
hasRole
Checks if the user is assigned a specific Role in any of the given Groups- Angegeben von:
hasRole
in SchnittstelleDynamicAccessControlList
- Parameter:
role
- the Rolegroupset
- a Groupset- Gibt zurück:
true
if the user is assigned the Role in any of the given Groups.
-
hasRole
Checks if the user is assigned a specific Role in the Group.- Angegeben von:
hasRole
in SchnittstelleDynamicAccessControlList
- Parameter:
role
- the Rolegroup
- the Group- Gibt zurück:
true
if the user is assigned the Role in the Group.
-
hasRole
Checks if the user is assigned a specific Role in any of the given Groups- Angegeben von:
hasRole
in SchnittstelleDynamicAccessControlList
- Parameter:
rolename
- the name of the Rolegroupset
- a Groupset- Gibt zurück:
true
if the user is assigned the Role in any of the given Groups.
-
hasRole
Checks if the user is assigned a specific Role- Angegeben von:
hasRole
in SchnittstelleDynamicAccessControlList
- Parameter:
role
- the Role- Gibt zurück:
true
if the user is assigned the Role in the global Group.
-
hasRole
Checks if the user is assigned a specific Role .- Angegeben von:
hasRole
in SchnittstelleDynamicAccessControlList
- Parameter:
role
- the Role- Gibt zurück:
true
if the user is assigned the Role .
-
hasPermission
Checks if the user is assigned a specific Permission in the Group.- Angegeben von:
hasPermission
in SchnittstelleDynamicAccessControlList
- Parameter:
permission
- the Permissiongroup
- the Group- Gibt zurück:
true
if the user is assigned the Permission in the Group.
-
hasPermission
Checks if the user is assigned a specific Permission in any of the given Groups- Angegeben von:
hasPermission
in SchnittstelleDynamicAccessControlList
- Parameter:
permission
- the Permissiongroupset
- a Groupset- Gibt zurück:
true
if the user is assigned the Permission in any of the given Groups.
-
hasPermission
Checks if the user is assigned a specific Permission in the Group.- Angegeben von:
hasPermission
in SchnittstelleDynamicAccessControlList
- Parameter:
permission
- the Permissiongroup
- the Group- Gibt zurück:
true
if the user is assigned the Permission in the Group.
-
hasPermission
Checks if the user is assigned a specific Permission in the Group.- Angegeben von:
hasPermission
in SchnittstelleDynamicAccessControlList
- Parameter:
permission
- the Permissiongroup
- the Group- Gibt zurück:
true
if the user is assigned the Permission in the Group.
-
hasPermission
Checks if the user is assigned a specific Permission in any of the given Groups- Angegeben von:
hasPermission
in SchnittstelleDynamicAccessControlList
- Parameter:
permissionName
- the name of the Permissiongroupset
- a Groupset- Gibt zurück:
true
if the user is assigned the Permission in any of the given Groups.
-
hasPermission
Checks if the user is assigned a specific Permission.- Angegeben von:
hasPermission
in SchnittstelleDynamicAccessControlList
- Parameter:
permission
- the Permission- Gibt zurück:
true
if the user is assigned the Permission .
-
hasPermission
Checks if the user is assigned a specific Permission in the global Group.- Angegeben von:
hasPermission
in SchnittstelleDynamicAccessControlList
- Parameter:
permission
- the Permission- Gibt zurück:
true
if the user is assigned the Permission in the global Group.
-