Allow data_access_group field in user import to preserve DAG#499
Allow data_access_group field in user import to preserve DAG#499
Conversation
If data_access_group is excluded from user import, REDCap interprets the absence as the user having no DAG, causing DAG assignments to be lost on every import. Including this field preserves existing DAG assignments when updating user records via the API.
This is the code we just did a lot of work on around userImports. The exclusion of DAG on this was what made it work before. We need to dive in a little deeper. @couthcommander you did some work on this. Thoughts? |
|
It's complicated, and I'm not sure if this is a new complication or an old complication. But I can confirm that production code resets DAG to "not assigned to group".
And then... "data_access_group" is part of "REDCAP_USER_TABLE_ACCESS_VARIABLES" (see redcapDataStructure). This is intended to be used to define 0/1 permissions (ie, does this user have access to the DAG form?). I'm not sure if this is correct. Furthermore... There are API functions for user DAG assignment. There's also the REDCAP_SYSTEM_FIELD "redcap_data_access_group", but I think it's not relevant. Ultimately, I recommend we collectively meet and test behaviour on the API playground to determine how redcapAPI should work. |
|
Thanks. I think we should take the position of the following: I'm an API user and I need to import / export User information. How should this work? Underneath we can call multiple APIs and deal with the complexities, but it seems possible the current function interface doesn't meet the use cases properly. I.e., we consider what we want to do, design that call and then create functions that do tat. |
|
Several improvements are needed, see #500 |
|
This update is already included in #501. I will close this one. |
If data_access_group is excluded from user import, REDCap interprets
the absence as the user having no DAG, causing DAG assignments to be
lost on every import. Including this field preserves existing DAG
assignments when updating user records via the API.