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

* refactor: move file for ownership

* deleted the file
pull/72084/head
Eric Leijonmarck 2 years ago committed by GitHub
parent 9b4dde7430
commit b4c4b512d7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 4
      public/app/features/auth-config/index.ts
  2. 10
      public/app/features/auth-config/state/actions.ts
  3. 4
      public/app/features/auth-config/state/reducers.ts
  4. 22
      public/app/features/auth-config/types.ts
  5. 20
      public/app/types/configAuth.ts
  6. 1
      public/app/types/index.ts

@ -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: {},

@ -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[];
}

@ -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[];
}

@ -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';

Loading…
Cancel
Save