mirror of
https://github.com/azaion/admin.git
synced 2026-04-22 22:16:33 +00:00
d320d6dd59
Made-with: Cursor
1.4 KiB
1.4 KiB
Module: Azaion.Common.Entities.RoleEnum
Purpose
Defines the authorization role hierarchy for the system.
Public Interface
| Enum Value | Int Value | Description |
|---|---|---|
None |
0 | No role assigned |
Operator |
10 | Annotator access only; can send annotations to queue |
Validator |
20 | Annotator + dataset explorer; can receive annotations from queue |
CompanionPC |
30 | Companion PC role |
Admin |
40 | Admin role |
ResourceUploader |
50 | Can upload DLLs and AI models |
ApiAdmin |
1000 | Full access to all operations |
Internal Logic
Integer values define a loose hierarchy; higher values don't necessarily imply more permissions — policy-based authorization in Program.cs maps specific roles to policies.
Dependencies
None.
Consumers
User.Roleproperty typeRegisterUserRequest.Roleproperty typeProgram.cs— authorization policies (apiAdminPolicy,apiUploaderPolicy)AuthService.CreateToken— embeds role as claimAzaionDbSchemaHolder— maps Role to/from text in DBUserService.GetUsers— filters by roleUserService.ChangeRole— updates user role
Data Models
Part of the User entity.
Configuration
None.
External Integrations
None.
Security
Core to the RBAC authorization model. ApiAdmin has unrestricted access; ResourceUploader can upload resources; other roles have endpoint-level restrictions.
Tests
None.