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 toTRUE
copy
User can view file content, copy, and download files from a project. Set value to
TRUE
to assign the user copy permission. Set toFALSE
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 toFALSE
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 toFALSE
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 toFALSE
to remove admin permission....
Other response arguments.
Method print()
Print method for Permission class.
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.
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()
}
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()
}