Skip to content

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

Copy link
Contributor

Reminder: This PR appears to be stale. If this PR is still a work in progress please mark as draft.

@microsoft-github-policy-service microsoft-github-policy-service bot added the Needs: Attention 👋 Awaiting response from the MSAL.js team label May 26, 2025
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 Needs: Attention 👋 Awaiting response from the MSAL.js team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

MsalGuard - Support RBAC with CanActivateFn
1 participant