ndex_user_show_group: Get User's Membership in Group

View source: R/ndex_users.R

ndex_user_show_groupR Documentation

Get User's Membership in Group

Description

Returns the permission that the user specified in the URL has on the given group. Returns an empty object if the authenticated user is not a member of this group.

Usage

ndex_user_show_group(ndexcon, userId, groupId)

Arguments

ndexcon

object of class NDExConnection linkndex_connect

userId

character; unique ID (UUID) of the user

groupId

character; unique ID (UUID) of the group

Value

List of permissions of that user or empty object

REST query

GET: ndex_config$api$user$group$get

Note

Requires an authorized user! (ndex_connect with credentials)

Compatible to NDEx server version 2.0

Examples

## Establish a server connection with credentials 
# ndexcon = ndex_connect('MyAccountName', 'MyPassword')
## Find user and get its id
# user = ndex_find_user_byName(ndexcon, 'SomeUserName')
# userId = user$externalId
## Find the user's groups and get one group id
# groups = ndex_user_list_groups(ndexcon, userId)
# groupId = groups[1,"externalId"]
## get users's permission in the group
# userPermissions = ndex_user_show_group(ndexcon, userId, groupId)
## $`uuuuuuuu-ssss-eeee-rrrr-123456789abc`
## [1] "MEMBER"
NULL

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