remove_access: Remove a subject from an object's access policy

View source: R/access.R

remove_accessR Documentation

Remove a subject from an object's access policy

Description

Remove the given subjects from the access policy for the given objects on the given Member Node. For each type of permission, this function checks if the permission is already set and only updates the System Metadata when a change is needed.

Usage

remove_access(
  mn,
  pids,
  subjects,
  permissions = c("read", "write", "changePermission")
)

Arguments

mn

(MNode) The Member Node.

pids

(character) The PIDs of the objects to set permissions for.

subjects

(character) The identifiers of the subjects to set permissions for, typically an ORCID or DN.

permissions

(character) Optional. The permissions to set. Defaults to read, write, and changePermission.

Value

(logical) Whether an update was needed.

Examples

## Not run: 
cn <- CNode("STAGING2")
mn <- getMNode(cn,"urn:node:mnTestKNB")
pids <- c("urn:uuid:3e5307c4-0bf3-4fd3-939c-112d4d11e8a1",
   "urn:uuid:23c7cae4-0fc8-4241-96bb-aa8ed94d71fe")
remove_access(mn, pids, subjects = "http://orcid.org/0000-000X-XXXX-XXXX",
   permissions = c("read", "write", "changePermission"))

## End(Not run)

NCEAS/arcticdatautils documentation built on Aug. 28, 2023, 12:10 p.m.