Skip to contents

R6 Class representing member's permissions.

Super class

sevenbridges2::Item -> Permission

Public fields

write

Write permission.

read

Read permission.

copy

Copy permission.

execute

Execute permission.

admin

Admin permission.

Methods


Method new()

Create a new Permission object.

Usage

Permission$new(
  read = TRUE,
  copy = FALSE,
  write = FALSE,
  execute = FALSE,
  admin = FALSE,
  ...
)

Arguments

read

User can view file names, metadata, and workflows. They cannot view file contents. All members of a project have read permissions by default. Even if you try setting read permissions to FALSE, they will still default to TRUE

copy

User can view file content, copy, and download files from a project. Set value to TRUE to assign the user copy permission. Set to FALSE to remove copy permission.

write

User can add, modify, and remove files and workflows in a project. Set value to TRUE to assign the user write permission. Set to FALSE to remove write permission.

execute

User can execute workflows and abort tasks in a project. Set value to TRUE to assign the user execute permission. Set to FALSE to remove execute permission.

admin

User can modify another user's permissions on a project, add or remove people from the project and manage funding sources. They also have all of the above permissions. Set value to TRUE to assign the user admin permission. Set to FALSE to remove admin permission.

...

Other response arguments.


Method print()

Print method for Permission class.

Usage

Permission$print()

Examples

\dontrun{
 # x is API response when permission is requested
 permission_object <- Permission$new(
                    write = x$write,
                    read = x$read,
                    copy = x$copy,
                    execute = x$execute,
                    admin = x$admin,
                    href = x$href,
                    auth = auth,
                    response = attr(x, "response")
                   )
 # Print permission object
 permission_object$print()
}


Method reload()

Reload Permission object information.

Usage

Permission$reload()

Examples

\dontrun{
 # x is API response when permission is requested
 permission_object <- Permission$new(
                    write = x$write,
                    read = x$read,
                    copy = x$copy,
                    execute = x$execute,
                    admin = x$admin,
                    href = x$href,
                    auth = auth,
                    response = attr(x, "response")
                   )

 # Reload permission object
 permission_object$reload()
}


Method clone()

The objects of this class are cloneable with this method.

Usage

Permission$clone(deep = FALSE)

Arguments

deep

Whether to make a deep clone.

Examples


## ------------------------------------------------
## Method `Permission$print`
## ------------------------------------------------

if (FALSE) {
 # x is API response when permission is requested
 permission_object <- Permission$new(
                    write = x$write,
                    read = x$read,
                    copy = x$copy,
                    execute = x$execute,
                    admin = x$admin,
                    href = x$href,
                    auth = auth,
                    response = attr(x, "response")
                   )
 # Print permission object
 permission_object$print()
}


## ------------------------------------------------
## Method `Permission$reload`
## ------------------------------------------------

if (FALSE) {
 # x is API response when permission is requested
 permission_object <- Permission$new(
                    write = x$write,
                    read = x$read,
                    copy = x$copy,
                    execute = x$execute,
                    admin = x$admin,
                    href = x$href,
                    auth = auth,
                    response = attr(x, "response")
                   )

 # Reload permission object
 permission_object$reload()
}