Add empty state message for role assignment

- Display helpful message when no custom roles available
- Clarify that system roles are auto-assigned
- Add noCustomRolesToAssign translation in English and Chinese
This commit is contained in:
ZacharyZcR
2025-12-15 03:34:35 +08:00
parent f4f1440991
commit dd56108e8a
3 changed files with 11 additions and 0 deletions

View File

@@ -1787,6 +1787,15 @@ export function AdminSettings({
{t(role.displayName)}
</Button>
))}
{availableRoles.filter(
(role) =>
!role.isSystem &&
!userRoles.some((ur) => ur.roleId === role.id),
).length === 0 && (
<p className="text-sm text-muted-foreground">
{t("rbac.noCustomRolesToAssign")}
</p>
)}
</div>
</div>
</div>