|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object | +--com.starbase.starteam.AccessRightsManager
Provides utilities for manipulating access rights.
Access rights information is fetched from the server as necessary, and cached to improve performance of subsequent access tests.
| Constructor Summary | |
AccessRightsManager(Server s)
Creates a new access rights manager for the given server. |
|
| Method Summary | |
AccessTestResults |
accessTest(int userID,
int permissions,
EffectiveACE[] acl)
Determines whether or not the given user is granted the given permissions to a securable object with the given access control list. |
AccessTestResults |
accessTest(int userID,
int permissions,
ISecurable obj)
Performs an access test against the given securable object. |
AccessTestResults |
accessTest(int userID,
int permissions,
ISecurableContainer container,
Type type)
Performs an access test against the given securable container. |
void |
discard()
Discards cached access rights information. |
boolean |
equals(java.lang.Object source)
returns true if this object instance is equal to the source |
EffectiveACE[] |
getEffectiveACL(ISecurable obj)
Gets the effective access control list for the given securable object. |
EffectiveACE[] |
getEffectiveContainerACL(ISecurableContainer container,
Type type)
Gets the effective access control list for objects of a given type in a given securable container. |
int |
hashCode()
returns a unique hash for all instances of this type |
boolean |
isAccessGranted(int userID,
int permissions,
EffectiveACE[] acl)
Determines whether or not the given user is granted the given permissions to a securable object with the given access control list. |
boolean |
isAccessGranted(int userID,
int permissions,
ISecurable obj)
Determines whether or not the given user is granted the given permissions to the given securable object. |
boolean |
isAccessGranted(int userID,
int permissions,
ISecurableContainer container,
Type type)
Determines whether or not the given user is granted the given permissions to the given securable container. |
void |
refresh()
Refreshes cached access rights information to reflect recent changes to the server. |
| Methods inherited from class java.lang.Object |
getClass, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public AccessRightsManager(Server s)
s - The server whose access rights are to be managed.| Method Detail |
public void refresh()
public void discard()
public EffectiveACE[] getEffectiveACL(ISecurable obj)
The effective access control list completely encompasses all information used by the server to perform an access test for the given object.
This might include an object-level ACL defined for the object itself, or a container-level ACL defined on a parent folder, or on the view or project, as well as implied ACEs resulting from group privileges, object ownership, and so on.
obj - A securable object.
ISecurable,
EffectiveACE,
AccessRightsManager.isAccessGranted(int, int, EffectiveACE[]),
AccessRightsManager.accessTest(int, int, EffectiveACE[])
public EffectiveACE[] getEffectiveContainerACL(ISecurableContainer container,
Type type)
The effective access control list completely encompasses all information used by the server to perform an access test for the given object.
This might include an object-level ACL defined for the object itself, or a container-level ACL defined on a parent folder, or on the view or project, as well as implied ACEs resulting from group privileges, object ownership, and so on.
container - A securable container.type - The object type.
ISecurableContainer,
EffectiveACE,
AccessRightsManager.isAccessGranted(int, int, EffectiveACE[]),
AccessRightsManager.accessTest(int, int, EffectiveACE[])
public boolean isAccessGranted(int userID,
int permissions,
ISecurable obj)
Determining the effective access control list for a securable object is a reasonably expensive operation. For applications that need to perform multiple access tests on the same securable object, consider using the form of isAccessGranted() that takes the effective ACL as a parameter.
userID - The userID of the user for which the access test is performed.permissions - The set of permission flags to be tested.obj - The securable object against which the test is performed.
Permissions,
ISecurable,
AccessRightsManager.getEffectiveACL(ISecurable),
AccessRightsManager.isAccessGranted(int,int,EffectiveACE[])
public boolean isAccessGranted(int userID,
int permissions,
ISecurableContainer container,
Type type)
Determining the effective access control list for a securable container is a reasonably expensive operation. For applications that need to perform multiple access tests on the same securable object, consider using the form of isAccessGranted() that takes the effective ACL as a parameter.
userID - The userID of the user for which the access test is performed.permissions - The set of permission flags to be tested.container - The securable container against which the test is performed.type - The type of object for which the test is performed.
Permissions,
ISecurable,
AccessRightsManager.getEffectiveContainerACL(ISecurableContainer,Type),
AccessRightsManager.isAccessGranted(int,int,EffectiveACE[])
public boolean isAccessGranted(int userID,
int permissions,
EffectiveACE[] acl)
userID - The userID of the user for which the access test is performed.permissions - The set of permission flags to be tested.acl - The access control list against which the test is performed.
Permissions,
EffectiveACE,
AccessRightsManager.getEffectiveACL(ISecurable)
public AccessTestResults accessTest(int userID,
int permissions,
ISecurable obj)
Determining the effective access control list for a securable object is a reasonably expensive operation. For applications that need to perform multiple access tests on the same securable object, consider using the form of accessTest() that takes the effective ACL as a parameter.
userID - The userID of the user for which the access test is performed.permissions - The set of permission flags to be tested.obj - The securable object against which the test is performed.
Permissions,
ISecurable,
AccessTestResults,
AccessRightsManager.getEffectiveACL(ISecurable),
AccessRightsManager.accessTest(int,int,EffectiveACE[])
public AccessTestResults accessTest(int userID,
int permissions,
ISecurableContainer container,
Type type)
Determining the effective access control list for a securable object is a reasonably expensive operation. For applications that need to perform multiple access tests on the same securable object, consider using the form of accessTest() that takes the effective ACL as a parameter.
userID - The userID of the user for which the access test is performed.permissions - The set of permission flags to be tested.container - The securable container against which the test is performed.type - The type of object for which the test is performed.
Permissions,
ISecurable,
AccessTestResults,
AccessRightsManager.getEffectiveContainerACL(ISecurableContainer,Type),
AccessRightsManager.accessTest(int,int,EffectiveACE[])
public AccessTestResults accessTest(int userID,
int permissions,
EffectiveACE[] acl)
userID - The userID of the user for which the access test is performed.permissions - The set of permission flags to be tested.acl - The access control list against which the test is performed.
Permissions,
EffectiveACE,
AccessTestResults,
AccessRightsManager.getEffectiveACL(ISecurable)public boolean equals(java.lang.Object source)
equals in class java.lang.Objectsource - Object the source to comapre with
public int hashCode()
hashCode in class java.lang.Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||