Skip to content

Commit

Permalink
add email
Browse files Browse the repository at this point in the history
  • Loading branch information
wg102 committed Apr 3, 2024
1 parent c225887 commit 67da612
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 2 additions & 0 deletions components/centraldashboard/app/api_workgroup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ interface AddOrRemoveContributorRequest {

interface HasWorkgroupResponse {
user: string;
email: string;
hasAuth: boolean;
hasWorkgroup: boolean;
registrationFlowAllowed: boolean;
Expand Down Expand Up @@ -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,
};
Expand Down
3 changes: 2 additions & 1 deletion components/centraldashboard/public/components/main-page.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 67da612

Please sign in to comment.