Skip to content

exportUserRoles() collapses all role data into one string and reuses it for every role (forms_export) #503

Description

@jubilee2

# 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions