Skip to content

Implement RBAC Guard #7734

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: dev
Choose a base branch
from
Open

Conversation

dirthsj
Copy link

@dirthsj dirthsj commented May 5, 2025

Closes #5804

A couple notes:

  • This is backported from Angular 19. As such, I've had to replace MaybeAsync<T> in several places with the actual types it desugars to, which may look odd.
  • There isn't any way to discover differences between CanActivateFn and CanActivateChildFn at runtime, since the types are identical. When an RBAC guard is used in the context of CanActivateChildFn, it will call canActivate on the existing guard, which may result in misleading log messages.
  • I would appreciate extra scrutiny of my tests. The majority were copied from msal.guard.spec.ts to ensure I was passing through values correctly where appropriate.

@github-actions github-actions bot added the msal-angular Related to @azure/msal-angular package label May 5, 2025
@dirthsj
Copy link
Author

dirthsj commented May 5, 2025

@microsoft-github-policy-service agree

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
msal-angular Related to @azure/msal-angular package
Projects
None yet
Development

Successfully merging this pull request may close these issues.

MsalGuard - Support RBAC with CanActivateFn
1 participant