mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -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;
|
AzureADSkipOrgRoleSync?: boolean;
|
||||||
GoogleSkipOrgRoleSync?: boolean;
|
GoogleSkipOrgRoleSync?: boolean;
|
||||||
GenericOAuthSkipOrgRoleSync?: boolean;
|
GenericOAuthSkipOrgRoleSync?: boolean;
|
||||||
DisableSyncLock?: boolean;
|
|
||||||
AuthProxyEnableLoginToken?: boolean;
|
AuthProxyEnableLoginToken?: boolean;
|
||||||
}
|
}
|
||||||
|
@ -17,7 +17,6 @@ type FrontendSettingsAuthDTO struct {
|
|||||||
GithubSkipOrgRoleSync bool `json:"GithubSkipOrgRoleSync"`
|
GithubSkipOrgRoleSync bool `json:"GithubSkipOrgRoleSync"`
|
||||||
GitLabSkipOrgRoleSync bool `json:"GitLabSkipOrgRoleSync"`
|
GitLabSkipOrgRoleSync bool `json:"GitLabSkipOrgRoleSync"`
|
||||||
OktaSkipOrgRoleSync bool `json:"OktaSkipOrgRoleSync"`
|
OktaSkipOrgRoleSync bool `json:"OktaSkipOrgRoleSync"`
|
||||||
DisableSyncLock bool `json:"DisableSyncLock"`
|
|
||||||
AuthProxyEnableLoginToken bool `json:"AuthProxyEnableLoginToken"`
|
AuthProxyEnableLoginToken bool `json:"AuthProxyEnableLoginToken"`
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -165,7 +165,6 @@ func (hs *HTTPServer) getFrontendSettings(c *contextmodel.ReqContext) (*dtos.Fro
|
|||||||
GithubSkipOrgRoleSync: hs.Cfg.GitHubSkipOrgRoleSync,
|
GithubSkipOrgRoleSync: hs.Cfg.GitHubSkipOrgRoleSync,
|
||||||
GitLabSkipOrgRoleSync: hs.Cfg.GitLabSkipOrgRoleSync,
|
GitLabSkipOrgRoleSync: hs.Cfg.GitLabSkipOrgRoleSync,
|
||||||
OktaSkipOrgRoleSync: hs.Cfg.OktaSkipOrgRoleSync,
|
OktaSkipOrgRoleSync: hs.Cfg.OktaSkipOrgRoleSync,
|
||||||
DisableSyncLock: hs.Cfg.DisableSyncLock,
|
|
||||||
AuthProxyEnableLoginToken: hs.Cfg.AuthProxyEnableLoginToken,
|
AuthProxyEnableLoginToken: hs.Cfg.AuthProxyEnableLoginToken,
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -275,7 +275,6 @@ type Cfg struct {
|
|||||||
AdminPassword string
|
AdminPassword string
|
||||||
DisableLogin bool
|
DisableLogin bool
|
||||||
AdminEmail string
|
AdminEmail string
|
||||||
DisableSyncLock bool
|
|
||||||
DisableLoginForm bool
|
DisableLoginForm bool
|
||||||
// Not documented & not supported
|
// Not documented & not supported
|
||||||
// stand in until a more complete solution is implemented
|
// 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
|
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
|
// Do not use
|
||||||
cfg.AuthConfigUIAdminAccess = auth.Key("config_ui_admin_access").MustBool(false)
|
cfg.AuthConfigUIAdminAccess = auth.Key("config_ui_admin_access").MustBool(false)
|
||||||
cfg.AuthBrokerEnabled = auth.Key("broker").MustBool(true)
|
cfg.AuthBrokerEnabled = auth.Key("broker").MustBool(true)
|
||||||
|
@ -4,7 +4,6 @@ import { connect, ConnectedProps } from 'react-redux';
|
|||||||
import { NavModelItem } from '@grafana/data';
|
import { NavModelItem } from '@grafana/data';
|
||||||
import { featureEnabled } from '@grafana/runtime';
|
import { featureEnabled } from '@grafana/runtime';
|
||||||
import { Page } from 'app/core/components/Page/Page';
|
import { Page } from 'app/core/components/Page/Page';
|
||||||
import config from 'app/core/config';
|
|
||||||
import { contextSrv } from 'app/core/core';
|
import { contextSrv } from 'app/core/core';
|
||||||
import { GrafanaRouteComponentProps } from 'app/core/navigation/types';
|
import { GrafanaRouteComponentProps } from 'app/core/navigation/types';
|
||||||
import { StoreState, UserDTO, UserOrg, UserSession, SyncInfo, UserAdminError, AccessControlAction } from 'app/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 isLDAPUser = user?.isExternal && user?.authLabels?.includes('LDAP');
|
||||||
const canReadSessions = contextSrv.hasPermission(AccessControlAction.UsersAuthTokenList);
|
const canReadSessions = contextSrv.hasPermission(AccessControlAction.UsersAuthTokenList);
|
||||||
const canReadLDAPStatus = contextSrv.hasPermission(AccessControlAction.LDAPStatusRead);
|
const canReadLDAPStatus = contextSrv.hasPermission(AccessControlAction.LDAPStatusRead);
|
||||||
const isUserSynced = !config.auth.DisableSyncLock && user?.isExternallySynced;
|
|
||||||
|
|
||||||
const pageNav: NavModelItem = {
|
const pageNav: NavModelItem = {
|
||||||
text: user?.login ?? '',
|
text: user?.login ?? '',
|
||||||
@ -127,9 +125,13 @@ export class UserAdminPage extends PureComponent<Props> {
|
|||||||
onUserEnable={this.onUserEnable}
|
onUserEnable={this.onUserEnable}
|
||||||
onPasswordChange={this.onPasswordChange}
|
onPasswordChange={this.onPasswordChange}
|
||||||
/>
|
/>
|
||||||
{isLDAPUser && isUserSynced && featureEnabled('ldapsync') && ldapSyncInfo && canReadLDAPStatus && (
|
{isLDAPUser &&
|
||||||
<UserLdapSyncInfo ldapSyncInfo={ldapSyncInfo} user={user} onUserSync={this.onUserSync} />
|
user?.isExternallySynced &&
|
||||||
)}
|
featureEnabled('ldapsync') &&
|
||||||
|
ldapSyncInfo &&
|
||||||
|
canReadLDAPStatus && (
|
||||||
|
<UserLdapSyncInfo ldapSyncInfo={ldapSyncInfo} user={user} onUserSync={this.onUserSync} />
|
||||||
|
)}
|
||||||
<UserPermissions isGrafanaAdmin={user.isGrafanaAdmin} onGrafanaAdminChange={this.onGrafanaAdminChange} />
|
<UserPermissions isGrafanaAdmin={user.isGrafanaAdmin} onGrafanaAdminChange={this.onGrafanaAdminChange} />
|
||||||
</>
|
</>
|
||||||
)}
|
)}
|
||||||
@ -138,7 +140,7 @@ export class UserAdminPage extends PureComponent<Props> {
|
|||||||
<UserOrgs
|
<UserOrgs
|
||||||
user={user}
|
user={user}
|
||||||
orgs={orgs}
|
orgs={orgs}
|
||||||
isExternalUser={isUserSynced}
|
isExternalUser={user?.isExternallySynced}
|
||||||
onOrgRemove={this.onOrgRemove}
|
onOrgRemove={this.onOrgRemove}
|
||||||
onOrgRoleChange={this.onOrgRoleChange}
|
onOrgRoleChange={this.onOrgRoleChange}
|
||||||
onOrgAdd={this.onOrgAdd}
|
onOrgAdd={this.onOrgAdd}
|
||||||
|
Loading…
Reference in New Issue
Block a user