mirror of
https://github.com/langgenius/dify.git
synced 2026-09-19 10:11:30 +08:00
fix: add RBAC feature toggle to environment configuration (#37853)
This commit is contained in:
@@ -22,6 +22,7 @@ const defaultCloudEnv = {
|
||||
NEXT_PUBLIC_ENABLE_SOCIAL_OAUTH_LOGIN: true,
|
||||
NEXT_PUBLIC_ENABLE_TRIAL_APP: true,
|
||||
NEXT_PUBLIC_IS_EMAIL_SETUP: true,
|
||||
NEXT_PUBLIC_RBAC_ENABLED: false,
|
||||
}
|
||||
|
||||
const queryKey = ['console', 'systemFeatures'] as const
|
||||
@@ -139,6 +140,7 @@ describe('systemFeaturesQueryOptions', () => {
|
||||
enable_email_password_login: false,
|
||||
enable_social_oauth_login: true,
|
||||
enable_trial_app: true,
|
||||
rbac_enabled: false,
|
||||
})
|
||||
})
|
||||
|
||||
@@ -151,6 +153,7 @@ describe('systemFeaturesQueryOptions', () => {
|
||||
NEXT_PUBLIC_ENABLE_COLLABORATION_MODE: true,
|
||||
NEXT_PUBLIC_ALLOW_REGISTER: false,
|
||||
NEXT_PUBLIC_ENABLE_EXPLORE_BANNER: false,
|
||||
NEXT_PUBLIC_RBAC_ENABLED: true,
|
||||
},
|
||||
})
|
||||
|
||||
@@ -163,6 +166,7 @@ describe('systemFeaturesQueryOptions', () => {
|
||||
enable_collaboration_mode: true,
|
||||
is_allow_register: false,
|
||||
enable_explore_banner: false,
|
||||
rbac_enabled: true,
|
||||
branding: {
|
||||
enabled: false,
|
||||
application_title: '',
|
||||
|
||||
@@ -101,4 +101,5 @@ export const cloudSystemFeatures = {
|
||||
enable_creators_platform: env.NEXT_PUBLIC_CREATORS_PLATFORM_FEATURES_ENABLED,
|
||||
enable_trial_app: env.NEXT_PUBLIC_ENABLE_TRIAL_APP,
|
||||
enable_explore_banner: env.NEXT_PUBLIC_ENABLE_EXPLORE_BANNER,
|
||||
rbac_enabled: env.NEXT_PUBLIC_RBAC_ENABLED,
|
||||
} satisfies GetSystemFeaturesResponse
|
||||
|
||||
Reference in New Issue
Block a user