ndex_user_show_permission: Get User's Permission for Network

Description Usage Arguments Value REST query Note See Also Examples

View source: R/ndex_users.R

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

1
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

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
## 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

ndexr documentation built on March 13, 2021, 2 a.m.