NOISSUE - Rename Admin to SuperAdmin role

Signed-off-by: dusan <borovcanindusan1@gmail.com>
This commit is contained in:
dusan
2026-03-11 16:52:34 +01:00
parent 28ae84286e
commit df2446c2cc
10 changed files with 12 additions and 12 deletions
+1 -1
View File
@@ -1772,7 +1772,7 @@ func TestUpdateProfilePicture(t *testing.T) {
},
contentType: contentType,
token: validToken,
authnRes: smqauthn.Session{UserID: validID, DomainID: domainID, Role: smqauthn.AdminRole},
authnRes: smqauthn.Session{UserID: validID, DomainID: domainID, Role: smqauthn.SuperAdminRole},
status: http.StatusOK,
err: nil,
},
+1 -1
View File
@@ -190,7 +190,7 @@ func (am *authorizationMiddleware) OAuthAddUserPolicy(ctx context.Context, user
}
func (am *authorizationMiddleware) checkSuperAdmin(ctx context.Context, session authn.Session) error {
if session.Role != authn.AdminRole {
if session.Role != authn.SuperAdminRole {
return svcerr.ErrSuperAdminAction
}
if err := am.authz.Authorize(ctx, smqauthz.PolicyReq{