diff --git a/components/centraldashboard/app/api_workgroup.ts b/components/centraldashboard/app/api_workgroup.ts index db18edf379d..77d5006a810 100644 --- a/components/centraldashboard/app/api_workgroup.ts +++ b/components/centraldashboard/app/api_workgroup.ts @@ -25,6 +25,7 @@ interface AddOrRemoveContributorRequest { interface HasWorkgroupResponse { user: string; + email: string; hasAuth: boolean; hasWorkgroup: boolean; registrationFlowAllowed: boolean; @@ -271,6 +272,7 @@ export class WorkgroupApi { const response: HasWorkgroupResponse = { hasAuth: req.user.hasAuth, user: req.user.username, + email: req.user.email, hasWorkgroup: false, registrationFlowAllowed: this.registrationFlowAllowed, }; diff --git a/components/centraldashboard/public/components/main-page.js b/components/centraldashboard/public/components/main-page.js index 61bc0023b6f..6f7e0b4faea 100644 --- a/components/centraldashboard/public/components/main-page.js +++ b/components/centraldashboard/public/components/main-page.js @@ -271,9 +271,10 @@ export class MainPage extends mixinBehaviors([AppLocalizeBehavior], utilitiesMix */ _onHasWorkgroupResponse(ev) { console.log('onHasWorkgroupResponse', ev); - const {user, hasWorkgroup, hasAuth, + const {user, email, hasWorkgroup, hasAuth, registrationFlowAllowed} = ev.detail.response; this._setIsolationMode(hasAuth ? 'multi-user' : 'single-user'); + console.log('email', email); if (registrationFlowAllowed && hasAuth && !hasWorkgroup) { this.user = user; this._setRegistrationFlow(true);