microsoft-authentication-library-for-js icon indicating copy to clipboard operation
microsoft-authentication-library-for-js copied to clipboard

Implement RBAC Guard

Open dirthsj opened this issue 8 months ago • 2 comments

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.

dirthsj avatar May 05 '25 23:05 dirthsj

@microsoft-github-policy-service agree

dirthsj avatar May 05 '25 23:05 dirthsj

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