Skip to content

Commit a1522bf

Browse files
Implement ACME EAB for new accounts, and account deactivation
1 parent e81dffb commit a1522bf

File tree

6 files changed

+384
-84
lines changed

6 files changed

+384
-84
lines changed

src/Certify.Core/Management/Access/AccessControl.cs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -628,7 +628,10 @@ await GetSecurityPrincipalByUsername(contextUserId, passwordCheck.Username, incl
628628

629629
public async Task<List<AssignedAccessToken>> GetAssignedAccessTokens(string contextUserId)
630630
{
631-
if (!await IsPrincipalInRole(contextUserId, contextUserId, StandardRoles.Administrator.Id))
631+
// if not system user, must be in administrator role to list assigned access tokens
632+
// this "system" users is a special case because our ACME endpoints do not use the standard security principal model and have no associated user in most cases
633+
634+
if (contextUserId != "system" && !await IsPrincipalInRole(contextUserId, contextUserId, StandardRoles.Administrator.Id))
632635
{
633636
await AuditWarning("User {contextUserId} attempted to list assigned access tokens without being in required role.", contextUserId);
634637
return null;

0 commit comments

Comments
 (0)