-
Notifications
You must be signed in to change notification settings - Fork 86
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: Invite page in ssr is not working (#1200)
* fix: add noop impl for triggerInvite function * docs: document requirements per case * fix: add change password guard * Minor details
- Loading branch information
Showing
5 changed files
with
35 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
import { Injectable } from '@angular/core'; | ||
import { ActivatedRouteSnapshot, CanActivate, RouterStateSnapshot } from '@angular/router'; | ||
|
||
import { IdentityProviderFactory } from 'ish-core/identity-provider/identity-provider.factory'; | ||
|
||
@Injectable({ providedIn: 'root' }) | ||
export class IdentityProviderPasswordGuard implements CanActivate { | ||
constructor(private identityProviderFactory: IdentityProviderFactory) {} | ||
|
||
canActivate(route: ActivatedRouteSnapshot, state: RouterStateSnapshot) { | ||
return this.identityProviderFactory.getType() !== 'ICM' && this.identityProviderFactory.getInstance().triggerInvite | ||
? this.identityProviderFactory.getInstance().triggerInvite(route, state) | ||
: true; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters