Add or update a permission on a resource

opal.resource_perm_add(
  opal,
  project,
  resource,
  subject,
  type = "user",
  permission
)

Arguments

opal

Opal connection object.

project

The project name.

resource

The resource name.

subject

A vector of subject identifiers: user names or group names (depending on the type).

type

The type of subject: user (default) or group.

permission

The permission to apply: view, administrate. The 'view' permission is suitable for DataSHIELD operations.

Examples

if (FALSE) {
o <- opal.login('administrator','password', url='https://opal-demo.obiba.org')
opal.resource_perm_add(o, 'CNSIM', 'CNSIM1', c('andrei', 'valentina'), 'user', 'view')
opal.resource_perm(o, 'CNSIM', 'CNSIM1')
opal.resource_perm_delete(o, 'CNSIM', 'CNSIM1', c('andrei', 'valentina'), 'user')
opal.logout(o)
}