REDCap allows strict control of user rights for each project. These rights include a user’s ability to edit, export and view data, add or edit reports, import data, create records, etc. Privileges to view and export data are specified for each instrument.
User roles can be set with predefined privileges and users can then be assigned to these user role groups.
Both REDCapR and Pycap have functions for exporting user rights.
Extract the data_user table to view who has access to the REDCap project:
redcap_users_export output provides a list with several elements. The two most useful elements are the data_user and the data_user_form.
%%capture%%Rusers <- users_data$data_user
There is no way to export which user is in which named user role group with REDCapR or the native API. When you export this data, if a user has been assigned to a user role group, then it will return the user with the role’s defined privileges.
Extract the data_user_form table to view which forms each users has access to:
You can use the unique_role_name field from the export_user_roles output to see which user is assigned to which user role in the ouput of export_user_role_assignment.
The user rights tables also include information on which Data Access Group each user is assigned to. For more information on Data Access Groups see Chapter 16