Refactored organisation entities and endpoints
This commit is contained in:
@@ -19,6 +19,9 @@ public sealed class TenantContextService : ITenantContextService
|
||||
var user = httpContextAccessor.HttpContext?.User;
|
||||
|
||||
IsAdmin = user?.IsInRole("Admin") == true || user?.HasClaim("role", "Admin") == true;
|
||||
ByPassTenantQueryFilter = user?.IsInRole("Partner") == true || user?.HasClaim("role", "Partner") == true;
|
||||
|
||||
ByPassTenantQueryFilter = ByPassTenantQueryFilter || IsAdmin;
|
||||
|
||||
HasTenantFilter = !IsAdmin;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user