mirror of
https://github.com/azaion/admin.git
synced 2026-06-21 18:51:09 +00:00
3a925b9b0f
- Deleted the `POST /resources/get/{dataFolder?}` and `GET /resources/get-installer` endpoints as part of the architectural shift towards simplified resource management.
- Removed associated methods and configurations, including `ResourcesService.GetEncryptedResource`, `ResourcesService.GetInstaller`, and related properties in `ResourcesConfig`.
- Cleaned up environment variables and configuration files to reflect the removal of installer-related settings.
- Eliminated the `GetResourceRequest` DTO and its validator, along with the `WrongResourceName` error code.
- Updated documentation to clarify the changes in resource handling and the retirement of per-user file encryption.
Co-authored-by: Cursor <cursoragent@cursor.com>
2.4 KiB
2.4 KiB
Module: Azaion.Common.Entities.User
Purpose
Domain entity representing a system user, plus related value objects UserConfig and UserQueueOffsets.
Public Interface
User
| Property | Type | Description |
|---|---|---|
Id |
Guid |
Primary key |
Email |
string |
Unique user email |
PasswordHash |
string |
SHA-384 hash of plaintext password |
Hardware |
string? |
Raw hardware fingerprint string (set on first resource access) |
Role |
RoleEnum |
Authorization role |
CreatedAt |
DateTime |
Account creation timestamp |
LastLogin |
DateTime? |
Last successful resource-check/hardware-check timestamp |
UserConfig |
UserConfig? |
JSON-serialized user configuration |
IsEnabled |
bool |
Account active flag |
| Method | Signature | Description |
|---|---|---|
GetCacheKey |
static string GetCacheKey(string email) |
Returns cache key "User.{email}" |
UserConfig
| Property | Type | Description |
|---|---|---|
QueueOffsets |
UserQueueOffsets? |
Annotation queue offset tracking |
UserQueueOffsets
| Property | Type | Description |
|---|---|---|
AnnotationsOffset |
ulong |
Offset for annotations queue |
AnnotationsConfirmOffset |
ulong |
Offset for annotation confirmations |
AnnotationsCommandsOffset |
ulong |
Offset for annotation commands |
Internal Logic
GetCacheKey returns empty string for null/empty email to avoid cache key collisions.
Dependencies
RoleEnum
Consumers
- All services (
UserService,AuthService,ResourcesService) work withUser AzaionDbexposesITable<User>AzaionDbSchemaHoldermapsUserto theusersPostgreSQL tableSetUserQueueOffsetsRequestusesUserQueueOffsets
Data Models
Maps to PostgreSQL table users with columns: id, email, password_hash, hardware, role, user_config (JSON text), created_at, last_login, is_enabled.
Configuration
None.
External Integrations
None.
Security
PasswordHash stores SHA-384 hash. Hardware stores raw hardware fingerprint (hashed for comparison via Security.GetHWHash).
Tests
Indirectly tested end-to-end via e2e/Azaion.E2E/Tests/LoginTests.cs, UserManagementTests.cs, and DeviceTests.cs. (The previous in-process Azaion.Test/UserServiceTest and SecurityTest were both removed by cycle 2 along with the Azaion.Test project.)