Skip to content

Commit 6e86bcc

Browse files
Implement ACME EAB for new accounts, and account deactivation
1 parent 3045d7b commit 6e86bcc

6 files changed

Lines changed: 384 additions & 84 deletions

File tree

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)