Enhance inbound management by removing MaxClients property
- Removed the MaxClients property from Inbound-related data models, including InboundDto and PublishInboundCommand. - Updated related methods and handlers to reflect the removal of MaxClients, ensuring consistent behavior across the application. - Adjusted API documentation and frontend components to remove references to MaxClients, streamlining the inbound publishing process. - Enhanced logging in command handlers to handle node unavailability scenarios during user actions. - Improved database schema and migrations to align with the updated data model.
This commit is contained in:
@@ -63,12 +63,12 @@ AppUser
|
||||
| `IsPublished` | `bool` | Доступен ли для самообслуживания пользователями |
|
||||
| `AllowedRoleIds` | `Guid[]` | Id ролей, которым разрешено создавать конфиги (native PostgreSQL `uuid[]`; не навигация на `AppRole` — тот в Infrastructure/Identity, Domain на него не ссылается) |
|
||||
| `DisplayName` | `string?` | Витринное имя для пользователя, напр. «Германия (Trojan)» |
|
||||
| `MaxClients` | `int?` | Лимит клиентов (null = без лимита) |
|
||||
| `LastSyncAt` | `DateTimeOffset?` | |
|
||||
|
||||
Инварианты: конфиг можно создать только если `IsPublished && Node.IsEnabled`, **роль пользователя
|
||||
входит в `AllowedRoles`**, и при заданном `MaxClients` он не достигнут. Публикация инбаунда админом
|
||||
включает выбор `AllowedRoles` (напр. «Германия (Trojan)» → роли `user`, `vip`).
|
||||
Инварианты: конфиг можно создать только если `IsPublished && Node.IsEnabled && Node.Status !=
|
||||
Offline`, и **роль пользователя входит в `AllowedRoles`**. Публикация инбаунда админом включает
|
||||
выбор `AllowedRoles` (напр. «Германия (Trojan)» → роли `user`, `vip`). Лимита числа клиентов на
|
||||
инбаунд нет — квота ограничивается только на уровне пользователя (`AppRole.MaxConfigs`).
|
||||
|
||||
> **Пользователю показываем только `DisplayName` + протокол.** Адрес/хост ноды, `RemoteInboundId`,
|
||||
> `Port` и прочие детали 3x-ui в пользовательские DTO не попадают (только в админские).
|
||||
|
||||
Reference in New Issue
Block a user