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..c23104f027 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,12 @@ const User = types encryptedCreds: types.maybeNull(types.string), acceptedTerms: '1900-01-01T01:00:00.000Z', applyReason: 'N/A', + dataSources: types.optional(types.array(types.string), []), + aaAffiliation: types.maybeNull(types.optional(types.string, '')), + aaProjectId: types.maybeNull(types.optional(types.string, '')), + aaProjectName: 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 +84,12 @@ const User = types self.encryptedCreds = rawUser.encryptedCreds || self.encryptedCreds; self.applyReason = rawUser.applyReason || self.applyReason || ''; self.acceptedTerms = rawUser.acceptedTerms || self.acceptedTerms || ''; + self.dataSources = rawUser.dataSources || self.dataSources || []; + self.aaAffiliation = rawUser.aaAffiliation || self.aaAffiliation || ''; + self.piName = rawUser.piName || self.piName || ''; + self.projectName = rawUser.projectName || self.projectName || ''; + self.aaProjectId = rawUser.aaProjectId || self.aaProjectId || ''; + self.aaProjectName = rawUser.aaProjectName || self.aaProjectName || ''; // we don't update the other fields because they are being populated by a separate store }, })) diff --git a/addons/addon-custom/packages/main/lib/services/register-service.js b/addons/addon-custom/packages/main/lib/services/register-service.js index a10ef550d9..b0c2c60648 100644 --- a/addons/addon-custom/packages/main/lib/services/register-service.js +++ b/addons/addon-custom/packages/main/lib/services/register-service.js @@ -64,7 +64,19 @@ class RegisterUserService extends Service { const authProviders = await authConfigService.getAuthenticationProviderConfigs(); const providerConfig = authProviders[0].config; - const { lastName, firstName, email, acceptedTerms } = user; + const { + lastName, + firstName, + email, + acceptedTerms, + dataSources, + aaAffiliation, + piName, + projectName, + aaProjectId, + aaProjectName, + } = user; + const identityProviderName = providerConfig.federatedIdentityProviders.length === 0 ? providerConfig.title @@ -85,6 +97,12 @@ class RegisterUserService extends Service { encryptedCreds: 'N/A', firstName, lastName, + projectName, + dataSources, + aaAffiliation, + piName, + aaProjectId, + aaProjectName, identityProviderName, authenticationProviderId, isAdmin: false,