|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.rhq.enterprise.server.authz.AuthorizationManagerBean
public class AuthorizationManagerBean
| Constructor Summary | |
|---|---|
AuthorizationManagerBean()
|
|
| Method Summary | |
|---|---|
boolean |
canUpdateRepo(org.rhq.core.domain.auth.Subject subject,
int repoId)
Returns true if given subject is able to update given repo. |
boolean |
canViewAutoGroup(org.rhq.core.domain.auth.Subject subject,
int parentResourceId,
int resourceTypeId)
Returns true if the current user has some role attached to this auto-group. |
boolean |
canViewGroup(org.rhq.core.domain.auth.Subject subject,
int groupId)
Returns true if the current user has some role attached to this group. |
boolean |
canViewRepo(org.rhq.core.domain.auth.Subject subject,
int repoId)
Returns true if given subject is able to view given repo. |
boolean |
canViewResource(org.rhq.core.domain.auth.Subject subject,
int resourceId)
Returns true if the current user has some role attached to some group that contains this resource. |
boolean |
canViewResources(org.rhq.core.domain.auth.Subject subject,
List<Integer> resourceIds)
Returns true if the current user has a role attached to a group that contains the specified resources. |
Set<org.rhq.core.domain.authz.Permission> |
getExplicitGlobalPermissions(org.rhq.core.domain.auth.Subject subject)
Gets the set of global permissions that the current user explicitly possesses. |
Set<org.rhq.core.domain.authz.Permission> |
getExplicitGroupPermissions(org.rhq.core.domain.auth.Subject subject,
int groupId)
Gets the set of permissions that the current user explicitly possesses for the specified Group. |
Set<org.rhq.core.domain.authz.Permission> |
getExplicitResourcePermissions(org.rhq.core.domain.auth.Subject subject,
int resourceId)
Gets the set of permissions that the current user explicitly possesses for the specified Resource. |
Set<org.rhq.core.domain.authz.Permission> |
getImplicitGroupPermissions(org.rhq.core.domain.auth.Subject subject,
int groupId)
Gets the set of permissions that the current user implicitly possesses for the specified Group. |
Set<org.rhq.core.domain.authz.Permission> |
getImplicitResourcePermissions(org.rhq.core.domain.auth.Subject subject,
int resourceId)
Gets the set of permissions that the current user implicitly possesses for the specified Resource. |
boolean |
hasAutoGroupPermission(org.rhq.core.domain.auth.Subject subject,
org.rhq.core.domain.authz.Permission permission,
int parentResourceId,
int resourceTypeId)
Returns true if the current user possesses either: 1) the specified resource permission for the specified auto-group, or 2) the global MANAGE_INVENTORY permission which, by definition, gives full access to the inventory (all resources and all groups) |
boolean |
hasGlobalPermission(org.rhq.core.domain.auth.Subject subject,
org.rhq.core.domain.authz.Permission permission)
Returns true if the current user possesses the specified global permission. |
boolean |
hasGroupPermission(org.rhq.core.domain.auth.Subject subject,
org.rhq.core.domain.authz.Permission permission,
int groupId)
Returns true if the current user possesses either: 1) the specified resource permission for the specified group, or 2) the global MANAGE_INVENTORY permission which, by definition, gives full access to the inventory (all resources and all groups) |
boolean |
hasResourcePermission(org.rhq.core.domain.auth.Subject subject,
org.rhq.core.domain.authz.Permission permission,
Collection<Integer> resourceIds)
Returns true if the current user possesses either: 1) the specified resource permission for *all* of the specified resources, or 2) the global MANAGE_INVENTORY permission which, by definition, gives full access to the inventory (all resources and all groups) NOTE: The size of the collection must be less than or equal to 1000 (due to an Oracle limitation). |
boolean |
hasResourcePermission(org.rhq.core.domain.auth.Subject subject,
org.rhq.core.domain.authz.Permission permission,
int resourceId)
Returns true if the current user possesses either: 1) the specified resource permission for the specified resource, or 2) the global MANAGE_INVENTORY permission which, by definition, gives full access to the inventory (all resources and all groups) |
boolean |
isInventoryManager(org.rhq.core.domain.auth.Subject subject)
Returns whether the subject can manage all resources and all groups in the system, without having to filter operations through the subject-role-group-resource authorization mechanism |
boolean |
isOverlord(org.rhq.core.domain.auth.Subject subject)
Returns true if and only if the given subject represents the internal overlord subject. |
boolean |
isSystemSuperuser(org.rhq.core.domain.auth.Subject subject)
Returns true if and only if the given subject represents either the initial superuser (e.g. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public AuthorizationManagerBean()
| Method Detail |
|---|
public Set<org.rhq.core.domain.authz.Permission> getExplicitGlobalPermissions(org.rhq.core.domain.auth.Subject subject)
AuthorizationManagerLocal
getExplicitGlobalPermissions in interface AuthorizationManagerLocalsubject - the current subject or caller
public Set<org.rhq.core.domain.authz.Permission> getExplicitGroupPermissions(org.rhq.core.domain.auth.Subject subject,
int groupId)
AuthorizationManagerLocalGroup.
getExplicitGroupPermissions in interface AuthorizationManagerLocalsubject - the current subject or callergroupId - the id of some Group to check permissions against
Group - never null
public Set<org.rhq.core.domain.authz.Permission> getImplicitGroupPermissions(org.rhq.core.domain.auth.Subject subject,
int groupId)
AuthorizationManagerLocalGroup.
getImplicitGroupPermissions in interface AuthorizationManagerLocalsubject - the current subject or callergroupId - the id of some Group to check permissions against
Group
public Set<org.rhq.core.domain.authz.Permission> getExplicitResourcePermissions(org.rhq.core.domain.auth.Subject subject,
int resourceId)
AuthorizationManagerLocalResource.
getExplicitResourcePermissions in interface AuthorizationManagerLocalsubject - the current subject or callerresourceId - the id of some Resource to check permissions against
Resource - never null
public Set<org.rhq.core.domain.authz.Permission> getImplicitResourcePermissions(org.rhq.core.domain.auth.Subject subject,
int resourceId)
AuthorizationManagerLocalResource.
getImplicitResourcePermissions in interface AuthorizationManagerLocalsubject - the current subject or callerresourceId - the id of some Resource to check permissions against
Resource - never null
public boolean hasGlobalPermission(org.rhq.core.domain.auth.Subject subject,
org.rhq.core.domain.authz.Permission permission)
AuthorizationManagerLocal
hasGlobalPermission in interface AuthorizationManagerLocalsubject - the current subject or callerpermission - a global permission (i.e. permission.getTarget() == Permission.Target.GLOBAL)
public boolean hasGroupPermission(org.rhq.core.domain.auth.Subject subject,
org.rhq.core.domain.authz.Permission permission,
int groupId)
AuthorizationManagerLocal
hasGroupPermission in interface AuthorizationManagerLocalsubject - the current subject or callerpermission - a resource permission (i.e. permission.getTarget() == Permission.Target.RESOURCE)groupId - the id of some Group to check permissions against
public boolean hasResourcePermission(org.rhq.core.domain.auth.Subject subject,
org.rhq.core.domain.authz.Permission permission,
int resourceId)
AuthorizationManagerLocal
hasResourcePermission in interface AuthorizationManagerLocalsubject - the current subject or callerpermission - a resource permission (i.e. permission.getTarget() == Permission.Target.RESOURCE)resourceId - the id of some Resource to check permissions against
public boolean hasAutoGroupPermission(org.rhq.core.domain.auth.Subject subject,
org.rhq.core.domain.authz.Permission permission,
int parentResourceId,
int resourceTypeId)
AuthorizationManagerLocal
hasAutoGroupPermission in interface AuthorizationManagerLocalsubject - the current subject or callerpermission - a resource permission (i.e. permission.getTarget() == Permission.Target.RESOURCE)parentResourceId - the id of the parent resource of the auto-group to check permissions against
public boolean canViewResource(org.rhq.core.domain.auth.Subject subject,
int resourceId)
AuthorizationManagerLocal
canViewResource in interface AuthorizationManagerLocalsubject - the current subject or callerresourceId - the id of some Resource to check permissions against
public boolean canViewResources(org.rhq.core.domain.auth.Subject subject,
List<Integer> resourceIds)
AuthorizationManagerLocal
canViewResources in interface AuthorizationManagerLocalsubject - The current subject or callerresourceIds - The resource ids against which we are checking whether the subject has access
public boolean canViewGroup(org.rhq.core.domain.auth.Subject subject,
int groupId)
AuthorizationManagerLocal
canViewGroup in interface AuthorizationManagerLocalsubject - the current subject or callergroupId - the id of some Group to check permissions against
public boolean canViewAutoGroup(org.rhq.core.domain.auth.Subject subject,
int parentResourceId,
int resourceTypeId)
AuthorizationManagerLocal
canViewAutoGroup in interface AuthorizationManagerLocalsubject - the current subject or callerparentResourceId - the id of the parent resource filter for this auto-groupresourceTypeId - the id of the resource type filter for this auto-group
public boolean isInventoryManager(org.rhq.core.domain.auth.Subject subject)
AuthorizationManagerLocal
isInventoryManager in interface AuthorizationManagerLocalsubject - the current subject or caller
public boolean hasResourcePermission(org.rhq.core.domain.auth.Subject subject,
org.rhq.core.domain.authz.Permission permission,
Collection<Integer> resourceIds)
AuthorizationManagerLocal
hasResourcePermission in interface AuthorizationManagerLocalsubject - the current subject or callerpermission - a resource permission (i.e. permission.getTarget() == Permission.Target.RESOURCE)resourceIds - the ids of some Resources to check permissions against (size of collection must be <= 1000)
public boolean isSystemSuperuser(org.rhq.core.domain.auth.Subject subject)
AuthorizationManagerLocaltrue if and only if the given subject represents either the initial superuser (e.g.
rhqadmin) or the internal overlord subject. These are what is known as the "system superusers".
isSystemSuperuser in interface AuthorizationManagerLocalsubject - the subject to check
true if the given subject is considered one of the built-in system superuserspublic boolean isOverlord(org.rhq.core.domain.auth.Subject subject)
AuthorizationManagerLocaltrue if and only if the given subject represents the internal overlord subject.
isOverlord in interface AuthorizationManagerLocalsubject - the subject to check
true if the given subject is considered the overlord subject
public boolean canUpdateRepo(org.rhq.core.domain.auth.Subject subject,
int repoId)
AuthorizationManagerLocalPermission.MANAGE_REPOSITORIES.
canUpdateRepo in interface AuthorizationManagerLocal
public boolean canViewRepo(org.rhq.core.domain.auth.Subject subject,
int repoId)
AuthorizationManagerLocalPermission.MANAGE_REPOSITORIES.
canViewRepo in interface AuthorizationManagerLocal
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||