| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495 |
- import { User, UserSession } from 'app/types';
- interface LdapMapping {
- cfgAttrValue: string;
- ldapValue: string;
- }
- export interface LdapError {
- title: string;
- body: string;
- }
- export interface SyncInfo {
- enabled: boolean;
- schedule: string;
- nextSync: string;
- prevSync?: SyncResult;
- }
- export interface LdapUserSyncInfo {
- nextSync?: string;
- prevSync?: string;
- status?: string;
- }
- export interface SyncResult {
- started: string;
- elapsed: string;
- UpdatedUserIds: number[];
- MissingUserIds: number[];
- FailedUsers?: FailedUser[];
- }
- export interface FailedUser {
- Login: string;
- Error: string;
- }
- export interface LdapRole {
- orgId: number;
- orgName: string;
- orgRole: string;
- groupDN: string;
- }
- export interface LdapTeam {
- orgName: string;
- teamName: string;
- groupDN: string;
- }
- export interface LdapUserInfo {
- name: LdapMapping;
- surname: LdapMapping;
- email: LdapMapping;
- login: LdapMapping;
- }
- export interface LdapPermissions {
- isGrafanaAdmin: boolean;
- isDisabled: boolean;
- }
- export interface LdapUser {
- info: LdapUserInfo;
- permissions: LdapPermissions;
- roles: LdapRole[];
- teams: LdapTeam[];
- }
- export interface LdapServerInfo {
- available: boolean;
- host: string;
- port: number;
- error: string;
- }
- export type LdapConnectionInfo = LdapServerInfo[];
- export interface LdapState {
- connectionInfo: LdapConnectionInfo;
- user?: LdapUser;
- syncInfo?: SyncInfo;
- connectionError?: LdapError;
- userError?: LdapError;
- ldapError?: LdapError;
- }
- export interface LdapUserState {
- user?: User;
- ldapUser?: LdapUser;
- ldapSyncInfo?: SyncInfo;
- sessions?: UserSession[];
- userError?: LdapError;
- }
|