Skip to content

Commit

Permalink
Prevent admin from succeeding support admin requirement by default.
Browse files Browse the repository at this point in the history
  • Loading branch information
rmohammed-goaco committed Oct 4, 2024
1 parent 032ac6e commit 45cb788
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ protected override async Task HandleRequirementAsync(AuthorizationHandlerContext
var organisationUserScopes = await _userInfo.GetOrganisationUserScopes();

// Admin role can do anything within this organisation
if (organisationUserScopes.Contains(OrganisationPersonScopes.Admin))
if (organisationUserScopes.Contains(OrganisationPersonScopes.Admin) && requirement.Scope != PersonScopes.SupportAdmin)
{
context.Succeed(requirement);
return;
Expand Down

0 comments on commit 45cb788

Please sign in to comment.