|
|||||||||||
PREV PACKAGE NEXT PACKAGE | FRAMES NO FRAMES |
See:
Description
Interface Summary | |
AccessControlEntry | Represents an entry in an AccessControlList . |
AccessControlList | List of AccessControlEntry objects for a given path. |
Class Summary | |
Permission | Class representing a permission in an AccessControlEntry . |
Exception Summary | |
EntryExistsException | The EntryExistsException is thrown when a user attempts to create an AccessControlEntry
in an AccessControlList when that entry already exists in the list. |
UndeleteableEntryException | The UndeleteableEntryException is thrown when a user attempts to delete an AccessControlEntry
that is not deleteable. |
Provides classes and interfaces managing permissions for nodes.
Permissions to nodes in SDD are controlled using an AccessControlList
(ACL). Each node in SDD
contains a single ACL. The ACL contains a set of AccessControlEntry
(ACE) objects. Each
ACE in an ACL is associated with a single user or group. Each ACE contains a set of Permission
objects. For a File
, these permissions are
read, write, delete, and manage. A Container
has these
permissions in addition to four others.
These are inherit read, inherit write, inherit manage, and inherit delete. The "inherit"
permissions are used to determine the permissions for any new node created within that container.
To get the ACL, use
RepositoryService.getAccessControlList(com.sas.drugdev.remote.repository.Node)
. Once
you have an ACL, you can get its ACEs and modify permissions on those ACEs. You can also add and
remove user and group ACEs.
There are two ACEs that are associated with every node in SDD and can't be removed. One is a user
ACE and it is associated with the owner of the node. Its name is always
AccessControlEntry.USER_OWNER
. The other is a group ACE that represents all users who have
an account in SDD. Its name is always AccessControlEntry.GROUP_ALL_USERS
.
Here is an example of how to get an ACL for a file and add an ACE for the user fooUser to give him/her
read, write, and delete permissions:
AccessControlList acl = getService().getAccessControlList(new FileBean("/SDD/some/file.sas7bdat"));
AccessControlEntry ace = acl.createUserEntry("fooUser");
ace.addPermission(Permission.READ_PERMISSION);
ace.addPermission(Permission.WRITE_PERMISSION);
ace.addPermission(Permission.DELETE_PERMISSION);
acl.setEntry(ace);
getService().updateFileAccessControlList(acl);
|
|||||||||||
PREV PACKAGE NEXT PACKAGE | FRAMES NO FRAMES |