mirror of
https://github.com/whoswhip/Sharpbin.git
synced 2026-12-06 02:48:43 +00:00
feat(roles, visibility): refactor user roles to use flags and introduce visibility enum
This commit is contained in:
@@ -27,7 +27,7 @@ namespace SharpbinV3.Server.Authorization
|
||||
|
||||
var isBanned = context.User.Claims.Any(c => (c.Type == ClaimTypes.Role || c.Type == "role") && c.Value == "403");
|
||||
|
||||
if (httpContext?.GetApiKeyFromContext()?.User?.Roles?.Contains(403) == true)
|
||||
if (httpContext?.GetApiKeyFromContext()?.User?.IsBanned == true)
|
||||
isBanned = true;
|
||||
|
||||
if (!isBanned)
|
||||
|
||||
Reference in New Issue
Block a user