ndex_user_show_permission: Get User's Permission for Network

View source: R/ndex_users.R

ndex_user_show_permissionR Documentation

Get User's Permission for Network

Description

Get the type(s) of permission assigned to the authenticated user for the specified network. Returns a map which maps a network UUID to the highest permission assigned to the authenticated user.

Usage

ndex_user_show_permission(ndexcon, userId, networkId, directonly = FALSE)

Arguments

ndexcon

object of class NDExConnection linkndex_connect

userId

character; unique ID (UUID) of the user

networkId

character; unique ID (UUID) of the group

directonly

logical (default: FALSE); If directonly is set to true, permissions granted through groups are not included in the result

Value

List of permissions of that user ("READ"|"WRITE"|"ADMIN") or empty object

REST query

GET: ndex_config$api$user$permission$get

Note

Requires an authorized user! (ndex_connect with credentials)

Compatible to NDEx server version 2.0

See Also

ndex_network_get_permission

Examples

## Establish a server connection with credentials 
# ndexcon = ndex_connect('MyAccountName', 'MyPassword')
## get user by name to get UUID
# user = ndex_find_user_byName(ndexcon, 'MyAccountName')
# userId = user$externalId
## Find one of your networks and get its UUID
# networks = ndex_find_networks(ndexcon, accountName='MyAccountName')
# networkId = networks[1,"externalId"]
## get users's permission to a network
# networkPermissions = ndex_user_show_permission(ndexcon, userId, networkId, directonly=TRUE)
## $`nnneeett-wwww-oooo-rrrr-kkkkkkk11111`
## [1] "ADMIN"
NULL

frankkramer-lab/ndexr documentation built on April 4, 2023, 7:19 p.m.