refactor(dokploy): restrict license key access to owners only and enhance validation

- Updated the license key settings to ensure only users with the "owner" role can access certain functionalities.
- Modified the license key activation input validation to require a non-empty string.
- Improved error handling for network issues when validating license keys, providing clearer feedback to users.
- Adjusted the dashboard settings to redirect non-owner users appropriately.
This commit is contained in:
Mauricio Siu
2026-02-09 01:15:35 -06:00
parent 0a3a90c4e9
commit f5fa39b97e
5 changed files with 53 additions and 6 deletions

View File

@@ -404,8 +404,7 @@ const MENU: Menu = {
url: "/dashboard/settings/license",
icon: Key,
// Only enabled for admins in non-cloud environments
isEnabled: ({ auth }) =>
!!(auth?.role === "owner" || auth?.role === "admin"),
isEnabled: ({ auth }) => !!(auth?.role === "owner"),
},
{
isSingle: true,