mirror of
https://github.com/Dokploy/dokploy.git
synced 2026-07-25 15:55:43 +02:00
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:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user