|
# The API returns the forms_export string twice. We reduce it to once here |
|
temp <- UserRole$forms_export |
|
temp <- strsplit(temp, ",") |
|
temp <- unlist(temp) |
|
temp <- temp[!duplicated(temp)] |
|
temp <- paste0(temp, collapse = ",") |
|
UserRole$forms_export <- temp |
In exportUserRoles(), the code around lines 52–58 appears to paste/collapse multiple fields into a single comma-separated string, and then assign that same combined string to all roles (instead of computing it per-role). This makes the exported roles look like they all share identical permission strings even when they differ in REDCap.