Skip to content

Commit

Permalink
Settings: remove Authentication tab when auth is disabled
Browse files Browse the repository at this point in the history
  • Loading branch information
jesec committed Aug 5, 2020
1 parent 3226703 commit 8d11640
Showing 1 changed file with 14 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ import SettingsStore from '../../../stores/SettingsStore';
import UITab from './UITab';
import DiskUsageTab from './DiskUsageTab';

import UserConfig from '../../../../../../config';

class SettingsModal extends React.Component {
state = {
isSavingSettings: false,
Expand Down Expand Up @@ -174,13 +176,18 @@ class SettingsModal extends React.Component {
defaultMessage: 'Resources',
}),
},
authentication: {
content: AuthTab,
label: intl.formatMessage({
id: 'settings.tabs.authentication',
defaultMessage: 'Authentication',
}),
},
// TODO: disableUsersAndAuth is server's config not user's
...(UserConfig.disableUsersAndAuth !== true
? {
authentication: {
content: AuthTab,
label: intl.formatMessage({
id: 'settings.tabs.authentication',
defaultMessage: 'Authentication',
}),
},
}
: []),
ui: {
content: UITab,
label: intl.formatMessage({
Expand Down

0 comments on commit 8d11640

Please sign in to comment.