mirror of
https://github.com/azaion/loader.git
synced 2026-04-23 04:16:32 +00:00
8f7deb3fca
Made-with: Cursor
1.4 KiB
1.4 KiB
Module: user
Purpose
Defines the authenticated user model and role enumeration for authorization decisions.
Public Interface
Enums
RoleEnum (cdef enum)
| Value | Numeric |
|---|---|
| NONE | 0 |
| Operator | 10 |
| Validator | 20 |
| CompanionPC | 30 |
| Admin | 40 |
| ResourceUploader | 50 |
| ApiAdmin | 1000 |
Classes
User (cdef class)
| Attribute | Type | Visibility |
|---|---|---|
| id | str | public |
| str | public | |
| role | RoleEnum | public |
| Method | Signature | Description |
|---|---|---|
__init__ |
(self, str id, str email, RoleEnum role) |
Constructor |
Internal Logic
No logic — pure data class with enum.
Dependencies
- Internal: none (leaf module)
- External: none
Consumers
api_client— createsUserinstances from JWT claims inset_token(), maps role strings toRoleEnum
Data Models
RoleEnum + User are the data models.
Configuration
None.
External Integrations
None.
Security
Role hierarchy is implicit in numeric values but no authorization enforcement logic exists here.
Tests
No tests found.