user_manage: Used to manage REDCap project users

View source: R/user_manage.R

user_manageR Documentation

Used to manage REDCap project users

Description

Used to manage users - whether to change users present, or their specific roles and data access groups on a redcap project.

Usage

user_manage(
  redcap_project_uri,
  redcap_project_token,
  users = NULL,
  role = NULL,
  dag = NULL,
  remove = FALSE
)

Arguments

redcap_project_uri

URI (Uniform Resource Identifier) for the REDCap instance.

redcap_project_token

API (Application Programming Interface) for the REDCap project.

users

Vector of usernames or a dataframe containing at least 1 column ("username"). Further columns specifying individual patients to be removed ("remove") or assigned to roles ("role") or data access groups ("dag") can be added.

role

String of a single role ID, role name or username of user with the desired user rights to be applied to ALL users specified in "users" (use a column in users if wanting to be different for each user). Must specify "none" if no assignment of role.

dag

String of a unique DAG to ALL users specified in "users" will be assigned to (use a column in users if wanting to be different for each user). Must specify "none" if no assignment of DAG.

remove

Logical value indicating if ALL users specified in "users" are to be removed (use a column in users if wanting to be different for each user). Default is FALSE (no users to be removed).

Value

Nested tibbles of the outcome (1) "correct" users with the correct allocation specified (2) "error" users with an allocation unable to be completed. User acccounts are still required to be entered manually.


kamclean/collaborator documentation built on Nov. 17, 2023, 3:52 a.m.