File tree Expand file tree Collapse file tree 2 files changed +5
-2
lines changed
Expand file tree Collapse file tree 2 files changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -133,10 +133,14 @@ async function orgHelper (db) {
133133
134134 // Find associated users with the Org
135135 const orgUsers = [ ]
136+ const admins = [ ]
136137
137138 for ( const user of allUsers ) {
138139 if ( user . org_UUID === doc . UUID ) {
139140 orgUsers . push ( user . UUID )
141+ if ( user . authority ?. active_roles ?. includes ( 'ADMIN' ) ) {
142+ admins . push ( user . UUID )
143+ }
140144 }
141145 }
142146
@@ -185,12 +189,12 @@ async function orgHelper (db) {
185189 product_list : null , // don't have now
186190 soft_quota : null , // don't have now
187191 hard_quota : doc . policies ?. id_quota ,
192+ admins : admins ,
188193 contact_info : {
189194 additional_contact_users : [ ] , // don't have now
190195 poc : null , // don't have now
191196 poc_email : null , // don't have now
192197 poc_phone : null , // don't have now
193- admins : [ ] , // don't have now
194198 org_email : email ,
195199 website : site
196200 } ,
Original file line number Diff line number Diff line change @@ -62,7 +62,6 @@ async function newUserTransform (user, hash) {
6262 const tmpOrgUUID = await utils . getOrgUUID ( user . cna_short_name )
6363 user . org_UUID = tmpOrgUUID
6464 user . UUID = uuid . v4 ( )
65- user . authority = { active_roles : [ ] }
6665
6766 // shared secret key in development environments
6867 if ( process . env . NODE_ENV === 'development' || process . env . NODE_ENV === 'test' ) {
You can’t perform that action at this time.
0 commit comments