SAML: Move type definitions to auth config to change ownership to authnz team (#72463)

* refactor: move file for ownership

* deleted the file
This commit is contained in:
Eric Leijonmarck
2023-08-01 09:45:41 +01:00
committed by GitHub
parent 9b4dde7430
commit b4c4b512d7
6 changed files with 28 additions and 33 deletions
+2 -2
View File
@@ -1,6 +1,6 @@
import { AuthProviderStatus, Settings, SettingsSection } from 'app/types';
import { Settings, SettingsSection } from 'app/types';
import { AuthProviderInfo, GetStatusHook } from './types';
import { AuthProviderInfo, GetStatusHook, AuthProviderStatus } from './types';
export * from './types';
@@ -2,16 +2,10 @@ import { lastValueFrom } from 'rxjs';
import { getBackendSrv, isFetchError } from '@grafana/runtime';
import { contextSrv } from 'app/core/core';
import {
AccessControlAction,
Settings,
ThunkResult,
SettingsError,
UpdateSettingsQuery,
AuthProviderStatus,
} from 'app/types';
import { AccessControlAction, Settings, ThunkResult, UpdateSettingsQuery } from 'app/types';
import { getAuthProviderStatus, getRegisteredAuthProviders } from '..';
import { AuthProviderStatus, SettingsError } from '../types';
import { loadingBegin, loadingEnd, providerStatusesLoaded, resetError, setError, settingsUpdated } from './reducers';
@@ -1,6 +1,8 @@
import { createSlice, PayloadAction } from '@reduxjs/toolkit';
import { AuthConfigState, AuthProviderStatus, Settings, SettingsError } from 'app/types';
import { Settings } from 'app/types';
import { SettingsError, AuthProviderStatus, AuthConfigState } from '../types';
export const initialState: AuthConfigState = {
settings: {},
+21 -1
View File
@@ -1,4 +1,4 @@
import { AuthProviderStatus } from 'app/types';
import { Settings } from 'app/types';
export interface AuthProviderInfo {
id: string;
@@ -9,3 +9,23 @@ export interface AuthProviderInfo {
}
export type GetStatusHook = () => Promise<AuthProviderStatus>;
export interface AuthConfigState {
settings: Settings;
providerStatuses: Record<string, AuthProviderStatus>;
isLoading?: boolean;
updateError?: SettingsError;
warning?: SettingsError;
}
export interface AuthProviderStatus {
enabled: boolean;
configured: boolean;
configFoundInIniFile?: boolean;
hide?: boolean;
}
export interface SettingsError {
message: string;
errors: string[];
}
-20
View File
@@ -1,20 +0,0 @@
import { Settings } from 'app/types';
export interface AuthConfigState {
settings: Settings;
providerStatuses: Record<string, AuthProviderStatus>;
isLoading?: boolean;
updateError?: SettingsError;
warning?: SettingsError;
}
export interface AuthProviderStatus {
enabled: boolean;
configured: boolean;
hide?: boolean;
}
export interface SettingsError {
message: string;
errors: string[];
}
-1
View File
@@ -18,7 +18,6 @@ export * from './appEvent';
export * from './query';
export * from './accessControl';
export * from './supportBundles';
export * from './configAuth';
export * from './settings';
import * as CoreEvents from './events';