Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Note: This is only used when the resource 'rid' currently inherits its access control list from an ancestor. This requests request 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
{
 "createdBy":"admin",
 "modifiedBy":"admin",
 "modifiedOn":1307141851483,
 "resourceId":{rid},
 "resourceAccess":[
	{"userGroupId":"4",
	 "accessType":["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.

Get Access Control List for a Resource

...

...


GET http://repositoryservice.sagebase.org/repo/v1/resource/{rid}/acl

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
GET http://repositoryservice.sagebase.org/repo/v1/resource/{rid}/acl
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
}

...

Delete Access Control List for a Resource

This deletes the given object's ACL, restoring its dependence on its owner's permissions.

Code Block
DELETE http://repositoryservice.sagebase.org/repo/v1/resource/{rid}/acl

...

Get the principals who can be added to a resource's ACL

...