Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,13 @@ export enum ActionType {
}

export const setUser = (userInfo: UserInfo) => action(ActionType.SetUser, { userInfo });
export const beginImpersonate = (kind: string, name: string, subprotocols: string[]) =>
action(ActionType.BeginImpersonate, { kind, name, subprotocols });

export const beginImpersonate = (
kind: string,
name: string,
subprotocols: string[],
groups?: string[],
) => action(ActionType.BeginImpersonate, { kind, name, subprotocols, groups });
export const endImpersonate = () => action(ActionType.EndImpersonate);
export const setAdmissionWebhookWarning = (id: string, warning: AdmissionWebhookWarning) =>
action(ActionType.SetAdmissionWebhookWarning, { id, warning });
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ export const coreReducer = (
kind: action.payload.kind,
name: action.payload.name,
subprotocols: action.payload.subprotocols,
groups: action.payload.groups,
},
};
case ActionType.EndImpersonate: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ export type ImpersonateKind = {
kind: string;
name: string;
subprotocols: string[];
groups?: string[];
};

export type CoreState = {
Expand Down