|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectca.sqlpower.wabit.enterprise.client.security.WabitAccessManager
public class WabitAccessManager
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from interface ca.sqlpower.enterprise.client.security.SPAccessManager |
|---|
ca.sqlpower.enterprise.client.security.SPAccessManager.Permission |
| Constructor Summary | |
|---|---|
WabitAccessManager()
|
|
| Method Summary | |
|---|---|
boolean |
doSystemGrantsPermit(java.lang.String type,
java.util.List<ca.sqlpower.enterprise.client.Grant> grants,
java.util.Collection<ca.sqlpower.object.SPObject> dependantObjects,
java.util.Set<ca.sqlpower.enterprise.client.security.SPAccessManager.Permission> permissions)
Checks if the given grants give permission to perform the action represented by permissions on the given type of object. |
ca.sqlpower.util.SPSession |
getCurrentSession()
|
ca.sqlpower.enterprise.client.User |
getCurrentUser()
|
ca.sqlpower.util.SPSession |
getSystemSession()
|
void |
init(ca.sqlpower.enterprise.client.User currentUser,
ca.sqlpower.util.SPSession currentSession,
ca.sqlpower.util.SPSession systemSession)
Initializes this Access Manager. |
void |
init(ca.sqlpower.enterprise.client.User currentUser,
WabitSession systemSession)
Initializes this Access Manager. |
boolean |
isGranted(java.lang.String type,
java.util.Set<ca.sqlpower.enterprise.client.security.SPAccessManager.Permission> permissions)
Checks if the current user has permission to perform the action represented by the given set of Permissions on objects of class
type |
boolean |
isGranted(java.lang.String subject,
java.lang.String type,
java.util.Set<ca.sqlpower.enterprise.client.security.SPAccessManager.Permission> permissions)
Checks if the current user has permission to perform the action represented by the given set of Permissions on the object with
UUID subject. |
boolean |
isGrantGranted(ca.sqlpower.enterprise.client.Grant newGrant)
Checks if the current user has sufficient privilege to create the given Grant. |
boolean |
isWorkspaceGranted(java.util.Set<ca.sqlpower.enterprise.client.security.SPAccessManager.Permission> permissions)
Checks if the current user has permission to perform the action represented by the given set of Permissions on the current
workspace. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public WabitAccessManager()
| Method Detail |
|---|
public void init(@Nonnull
ca.sqlpower.enterprise.client.User currentUser,
@Nullable
ca.sqlpower.util.SPSession currentSession,
@Nonnull
ca.sqlpower.util.SPSession systemSession)
currentUser - The user to determine access for.currentSession - The session that contains all objects in question. It will be
used to look up dependencies.systemSession - The system session that contains currentUser, as well as all
groups and grants that apply
public void init(@Nonnull
ca.sqlpower.enterprise.client.User currentUser,
@Nonnull
WabitSession systemSession)
currentUser - The user to determine access for.systemSession - The system session that contains currentUser, as well as all
groups and grants that apply.
public boolean isGranted(@Nonnull
java.lang.String subject,
@Nullable
java.lang.String type,
@Nonnull
java.util.Set<ca.sqlpower.enterprise.client.security.SPAccessManager.Permission> permissions)
Permissions on the object with
UUID subject.
isGranted in interface ca.sqlpower.enterprise.client.security.SPAccessManagersubject - The UUID of the object in question.type - The simple name of the class of the object in question. If
null, system level permissions will not be checked.permissions - A Set of Permissions that represent the action in
question. If empty, this method returns true.
public boolean isGranted(@Nonnull
java.lang.String type,
@Nonnull
java.util.Set<ca.sqlpower.enterprise.client.security.SPAccessManager.Permission> permissions)
Permissions on objects of class
type
isGranted in interface ca.sqlpower.enterprise.client.security.SPAccessManagertype - The simple name of the class of object in question.permissions - A Set of Permissions that represent the action in
question. If empty, this method returns true.
public boolean isWorkspaceGranted(@Nonnull
java.util.Set<ca.sqlpower.enterprise.client.security.SPAccessManager.Permission> permissions)
Permissions on the current
workspace.
permissions - A Set of Permissions that represent the action in
question. If empty, this method returns true.
public boolean doSystemGrantsPermit(@Nullable
java.lang.String type,
java.util.List<ca.sqlpower.enterprise.client.Grant> grants,
java.util.Collection<ca.sqlpower.object.SPObject> dependantObjects,
java.util.Set<ca.sqlpower.enterprise.client.security.SPAccessManager.Permission> permissions)
permissions on the given type of object. Note
that this method will not necessarily represent whether the current User
can perform the action, only whether a User with the given grants can.
type - The simple name of the class of object in question.grants - A Collection of grants to check for the given permissions.dependantObjects - A List of all objects that are dependant on an object in
question. If the purpose of this call is to check if system
level permissions apply to a specific object, this should be
its dependant objects. Else, if the purpose is to check
permissions on all objects of the type, this should be empty.permissions - A Set of Permissions that represent the action in
question. If empty, this method returns true.public boolean isGrantGranted(ca.sqlpower.enterprise.client.Grant newGrant)
Grant.
public ca.sqlpower.util.SPSession getCurrentSession()
public ca.sqlpower.util.SPSession getSystemSession()
public ca.sqlpower.enterprise.client.User getCurrentUser()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||