...
Create Access Control List for a Resource
Note: This is only used when the resource 'rid' currently inherits its access control list from an ancestor. This requests causes 'rid' to cease ACL inheritance and instead use the ACL passed in with the request.
Code Block |
---|
POST http://repositoryservice.sagebase.org/repo/v1/resource/{rid}/acl {"foo"resourceId":{rid}, "resourceAccess":[ {"userGroupId":"4", "accessType":["bar"]} "READ","CHANGE_PERMISSIONS","DELETE","UPDATE","CREATE"] } ] } |
This overrides the inheritance of permissions from an owner object, in favor of assigning permissions directly to the given object.
...
Returns the ACL for the node responsible for the given node's permissions. Note: In the following example, 'resourceId' is the id of the node to which permissions are attached, either rid or one of rid's ancestors; there is one 'resourceAccess' entry per UserGroup (aka 'principal) having access to the resource; 'userGroupId' is the id of the UserGroup object; 'accessType' is the list of types of access the given UserGroup has to the given resource.
Code Block |
---|
{"id":"1",
"creationDate":1307141851484,
"uri":null,
"etag":"0",
"createdBy":"admin",
"resourceId":"1",
"resourceAccess":[
{"id":"1",
"userGroupId":"4",
"accessType":["READ","CHANGE_PERMISSIONS","DELETE","UPDATE","CREATE"]
}
],
"modifiedBy":"admin",
"modifiedOn":1307141851483
}
|
Update Access Control List for a Resource
Note: This is only used when a "resourceId" already specifies it's access control list (does not inherit from an ancestor).
Code Block |
---|
PUT http://repositoryservice.sagebase.org/repo/v1/resource/{rid}/acl {"foo":["bar"]"id":"1", "creationDate":1307141851484, "uri":null, "etag":"0", "createdBy":"admin", "resourceId":{rid}, "resourceAccess":[ {"id":"1", "userGroupId":"4", "accessType":["READ","CHANGE_PERMISSIONS","DELETE","UPDATE","CREATE"] } ], "modifiedBy":"admin", "modifiedOn":1307141851483 } |
Delete Access Control List for a Resource
...