| clearAccessPolicy | R Documentation |
Clears the accessPolicy from the specified object by overwriting all existing access rules set on the object with an empty set.
clearAccessPolicy(x, ...)
## S4 method for signature 'SystemMetadata'
clearAccessPolicy(x, ...)
## S4 method for signature 'DataObject'
clearAccessPolicy(x, ...)
## S4 method for signature 'DataPackage'
clearAccessPolicy(x, identifiers = list(), ...)
x |
the instance to clear access rules from. |
... |
(Additional parameters) |
identifiers |
A list of |
The SystemMetadata object with the cleared access policy.
The DataObject with the cleared access policy.
The SystemMetadata object with the cleared access policy.
SystemMetadata-class
DataObject-class
DataPackage-class
# Clear access policy for a SystemMetadata object.
sysmeta <- new("SystemMetadata")
sysmeta <- addAccessRule(sysmeta, "uid=smith,ou=Account,dc=example,dc=com", "write")
sysmeta <- clearAccessPolicy(sysmeta)
# Clear access policy for a DataObject
do <- new("DataObject", format="text/csv", filename=system.file("extdata/sample-data.csv",
package="datapack"))
do <- addAccessRule(do, "uid=smith,ou=Account,dc=example,dc=com", "write")
do <- clearAccessPolicy(do)
# Clear access policy for a DataPackage
dp <- new("DataPackage")
data <- charToRaw("1,2,3\n4,5,6\n")
obj <- new("DataObject", dataobj=data, format="text/csv")
dp <- addMember(dp, obj)
data2 <- charToRaw("7,8,9\n4,10,11\n")
obj2 <- new("DataObject", dataobj=data2, format="text/csv")
dp <- addMember(dp, obj2)
# Add the access rule to all package members
dp <- addAccessRule(dp, "uid=smith,ou=Account,dc=example,dc=com",
permission="write")
# Now clear the access policy for just the second object
dp <- clearAccessPolicy(dp, getIdentifier(obj2))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.