public class TurbineAccessControlListImpl extends Object implements TurbineAccessControlList
Constructor and Description |
---|
TurbineAccessControlListImpl(Set<? extends TurbineUserGroupRole> turbineUserGroupRoleSet,
GroupManager groupManager,
RoleManager roleManager,
TurbineModelManager modelManager)
Constructs a new AccessControlList.
|
Modifier and Type | Method and Description |
---|---|
Group[] |
getAllGroups()
Returns all groups defined 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(String permission)
Checks if the user is assigned a specific Permission in the global 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
Groups
|
boolean |
hasPermission(String permission,
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(String role)
Checks if the user is assigned a specific Role in the global Group.
|
boolean |
hasRole(String rolename,
GroupSet groupset)
Checks if the user is assigned a specific Role in any of the given
Groups
|
boolean |
hasRole(String roleName,
String groupName)
Checks if the user is assigned a specific Role in the Group.
|
public TurbineAccessControlListImpl(Set<? extends TurbineUserGroupRole> turbineUserGroupRoleSet, GroupManager groupManager, RoleManager roleManager, TurbineModelManager modelManager) throws FulcrumSecurityException
turbineUserGroupRoleSet
- The set of user/group/role relations that this acl is built fromgroupManager
- the Group managerroleManager
- the Role managermodelManager
- he model ManagerFulcrumSecurityException
- if the global group cannot be retrievedpublic RoleSet getRoles(Group group)
getRoles
in interface TurbineAccessControlList
group
- the Grouppublic RoleSet getRoles()
getRoles
in interface TurbineAccessControlList
public PermissionSet getPermissions(Group group)
getPermissions
in interface TurbineAccessControlList
group
- the Grouppublic PermissionSet getPermissions()
getPermissions
in interface TurbineAccessControlList
public boolean hasRole(Role role, Group group)
hasRole
in interface TurbineAccessControlList
role
- the Rolegroup
- the Grouptrue
if the user is assigned the Role in the Group.public boolean hasRole(Role role, GroupSet groupset)
hasRole
in interface TurbineAccessControlList
role
- the Rolegroupset
- a Groupsettrue
if the user is assigned the Role in any of
the given Groups.public boolean hasRole(String roleName, String groupName)
hasRole
in interface TurbineAccessControlList
roleName
- the Role namegroupName
- the Group nametrue
if the user is assigned the Role in the Group.public boolean hasRole(String rolename, GroupSet groupset)
hasRole
in interface TurbineAccessControlList
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)
hasRole
in interface TurbineAccessControlList
role
- the Roletrue
if the user is assigned the Role in the global Group.public boolean hasRole(String role)
hasRole
in interface TurbineAccessControlList
role
- the Roletrue
if the user is assigned the Role in the global Group.public boolean hasPermission(Permission permission, Group group)
hasPermission
in interface TurbineAccessControlList
permission
- the Permissiongroup
- the Grouptrue
if the user is assigned the Permission in the Group.public boolean hasPermission(Permission permission, GroupSet groupset)
hasPermission
in interface TurbineAccessControlList
permission
- the Permissiongroupset
- a Groupsettrue
if the user is assigned the Permission in any
of the given Groups.public boolean hasPermission(String permission, String group)
hasPermission
in interface TurbineAccessControlList
permission
- the Permissiongroup
- the Grouptrue
if the user is assigned the Permission in the Group.public boolean hasPermission(String permission, Group group)
hasPermission
in interface TurbineAccessControlList
permission
- the Permissiongroup
- the Grouptrue
if the user is assigned the Permission in the Group.public boolean hasPermission(String permissionName, GroupSet groupset)
hasPermission
in interface TurbineAccessControlList
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)
hasPermission
in interface TurbineAccessControlList
permission
- the Permissiontrue
if the user is assigned the Permission in the global Group.public boolean hasPermission(String permission)
hasPermission
in interface TurbineAccessControlList
permission
- the Permissiontrue
if the user is assigned the Permission in the global Group.public Group[] getAllGroups()
getAllGroups
in interface TurbineAccessControlList
Copyright © 2011–2017 The Apache Software Foundation. All rights reserved.