From 54a1cd2352af48d2e46fa1c41d8f5153f9740b9e Mon Sep 17 00:00:00 2001 From: James Date: Mon, 2 Dec 2024 16:28:42 -0500 Subject: [PATCH] Fix missing user fields --- .../packages/base-raas-ui/src/models/users/User.js | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/addons/addon-base-raas-ui/packages/base-raas-ui/src/models/users/User.js b/addons/addon-base-raas-ui/packages/base-raas-ui/src/models/users/User.js index 218001b029..5c33694ad0 100644 --- a/addons/addon-base-raas-ui/packages/base-raas-ui/src/models/users/User.js +++ b/addons/addon-base-raas-ui/packages/base-raas-ui/src/models/users/User.js @@ -40,6 +40,13 @@ const User = types encryptedCreds: types.maybeNull(types.string), acceptedTerms: '1900-01-01T01:00:00.000Z', applyReason: 'N/A', + studyAdmin: types.optional(types.array(types.string), []), + studyReadWrite: types.optional(types.array(types.string), []), + studyRead: types.optional(types.array(types.string), []), + dataSource: types.maybeNull(types.optional(types.string, '')), + aaAffiliation: types.maybeNull(types.optional(types.string, '')), + piName: types.maybeNull(types.optional(types.string, '')), + projectName: types.maybeNull(types.optional(types.string, '')), }) .actions(self => ({ runInAction(fn) { @@ -78,6 +85,13 @@ const User = types self.encryptedCreds = rawUser.encryptedCreds || self.encryptedCreds; self.applyReason = rawUser.applyReason || self.applyReason || ''; self.acceptedTerms = rawUser.acceptedTerms || self.acceptedTerms || ''; + self.studyAdmin = rawUser.studyAdmin || self.studyAdmin || []; + self.studyReadWrite = rawUser.studyReadWrite || self.studyReadWrite || []; + self.studyRead = rawUser.studyRead || self.studyRead || []; + self.dataSource = rawUser.dataSource || self.dataSource || ''; + self.aaAffiliation = rawUser.aaAffiliation || self.aaAffiliation || ''; + self.piName = rawUser.piName || self.piName || ''; + self.projectName = rawUser.projectName || self.projectName || ''; // we don't update the other fields because they are being populated by a separate store }, }))