mirror of
https://github.com/grafana/grafana.git
synced 2025-02-11 08:05:43 -06:00
Chore: remove DisableSyncLock
setting, as it's not used anymore (#72680)
* rmeove DisableSyncLock setting, as it's not used anymore * remove unused import
This commit is contained in:
parent
91c7096eda
commit
1fa4f4bc57
@ -239,6 +239,5 @@ export interface AuthSettings {
|
||||
AzureADSkipOrgRoleSync?: boolean;
|
||||
GoogleSkipOrgRoleSync?: boolean;
|
||||
GenericOAuthSkipOrgRoleSync?: boolean;
|
||||
DisableSyncLock?: boolean;
|
||||
AuthProxyEnableLoginToken?: boolean;
|
||||
}
|
||||
|
@ -17,7 +17,6 @@ type FrontendSettingsAuthDTO struct {
|
||||
GithubSkipOrgRoleSync bool `json:"GithubSkipOrgRoleSync"`
|
||||
GitLabSkipOrgRoleSync bool `json:"GitLabSkipOrgRoleSync"`
|
||||
OktaSkipOrgRoleSync bool `json:"OktaSkipOrgRoleSync"`
|
||||
DisableSyncLock bool `json:"DisableSyncLock"`
|
||||
AuthProxyEnableLoginToken bool `json:"AuthProxyEnableLoginToken"`
|
||||
}
|
||||
|
||||
|
@ -165,7 +165,6 @@ func (hs *HTTPServer) getFrontendSettings(c *contextmodel.ReqContext) (*dtos.Fro
|
||||
GithubSkipOrgRoleSync: hs.Cfg.GitHubSkipOrgRoleSync,
|
||||
GitLabSkipOrgRoleSync: hs.Cfg.GitLabSkipOrgRoleSync,
|
||||
OktaSkipOrgRoleSync: hs.Cfg.OktaSkipOrgRoleSync,
|
||||
DisableSyncLock: hs.Cfg.DisableSyncLock,
|
||||
AuthProxyEnableLoginToken: hs.Cfg.AuthProxyEnableLoginToken,
|
||||
},
|
||||
|
||||
|
@ -275,7 +275,6 @@ type Cfg struct {
|
||||
AdminPassword string
|
||||
DisableLogin bool
|
||||
AdminEmail string
|
||||
DisableSyncLock bool
|
||||
DisableLoginForm bool
|
||||
// Not documented & not supported
|
||||
// stand in until a more complete solution is implemented
|
||||
@ -1524,9 +1523,6 @@ func readAuthSettings(iniFile *ini.File, cfg *Cfg) (err error) {
|
||||
cfg.TokenRotationIntervalMinutes = 2
|
||||
}
|
||||
|
||||
// Debug setting unlocking frontend auth sync lock. Users will still be reset on their next login.
|
||||
cfg.DisableSyncLock = auth.Key("disable_sync_lock").MustBool(false)
|
||||
|
||||
// Do not use
|
||||
cfg.AuthConfigUIAdminAccess = auth.Key("config_ui_admin_access").MustBool(false)
|
||||
cfg.AuthBrokerEnabled = auth.Key("broker").MustBool(true)
|
||||
|
@ -4,7 +4,6 @@ import { connect, ConnectedProps } from 'react-redux';
|
||||
import { NavModelItem } from '@grafana/data';
|
||||
import { featureEnabled } from '@grafana/runtime';
|
||||
import { Page } from 'app/core/components/Page/Page';
|
||||
import config from 'app/core/config';
|
||||
import { contextSrv } from 'app/core/core';
|
||||
import { GrafanaRouteComponentProps } from 'app/core/navigation/types';
|
||||
import { StoreState, UserDTO, UserOrg, UserSession, SyncInfo, UserAdminError, AccessControlAction } from 'app/types';
|
||||
@ -106,7 +105,6 @@ export class UserAdminPage extends PureComponent<Props> {
|
||||
const isLDAPUser = user?.isExternal && user?.authLabels?.includes('LDAP');
|
||||
const canReadSessions = contextSrv.hasPermission(AccessControlAction.UsersAuthTokenList);
|
||||
const canReadLDAPStatus = contextSrv.hasPermission(AccessControlAction.LDAPStatusRead);
|
||||
const isUserSynced = !config.auth.DisableSyncLock && user?.isExternallySynced;
|
||||
|
||||
const pageNav: NavModelItem = {
|
||||
text: user?.login ?? '',
|
||||
@ -127,9 +125,13 @@ export class UserAdminPage extends PureComponent<Props> {
|
||||
onUserEnable={this.onUserEnable}
|
||||
onPasswordChange={this.onPasswordChange}
|
||||
/>
|
||||
{isLDAPUser && isUserSynced && featureEnabled('ldapsync') && ldapSyncInfo && canReadLDAPStatus && (
|
||||
<UserLdapSyncInfo ldapSyncInfo={ldapSyncInfo} user={user} onUserSync={this.onUserSync} />
|
||||
)}
|
||||
{isLDAPUser &&
|
||||
user?.isExternallySynced &&
|
||||
featureEnabled('ldapsync') &&
|
||||
ldapSyncInfo &&
|
||||
canReadLDAPStatus && (
|
||||
<UserLdapSyncInfo ldapSyncInfo={ldapSyncInfo} user={user} onUserSync={this.onUserSync} />
|
||||
)}
|
||||
<UserPermissions isGrafanaAdmin={user.isGrafanaAdmin} onGrafanaAdminChange={this.onGrafanaAdminChange} />
|
||||
</>
|
||||
)}
|
||||
@ -138,7 +140,7 @@ export class UserAdminPage extends PureComponent<Props> {
|
||||
<UserOrgs
|
||||
user={user}
|
||||
orgs={orgs}
|
||||
isExternalUser={isUserSynced}
|
||||
isExternalUser={user?.isExternallySynced}
|
||||
onOrgRemove={this.onOrgRemove}
|
||||
onOrgRoleChange={this.onOrgRoleChange}
|
||||
onOrgAdd={this.onOrgAdd}
|
||||
|
Loading…
Reference in New Issue
Block a user