mirror of
https://github.com/MrUnknownDE/panel.git
synced 2026-04-19 06:43:45 +02:00
Get basic modal view for editing/creating a new subuser working
This commit is contained in:
@@ -1,15 +1,21 @@
|
||||
import { SubuserPermission } from '@/state/server/subusers';
|
||||
import { action, Action, thunk, Thunk } from 'easy-peasy';
|
||||
import getSystemPermissions from '@/api/getSystemPermissions';
|
||||
|
||||
export interface PanelPermissions {
|
||||
[key: string]: {
|
||||
description: string;
|
||||
keys: { [k: string]: string };
|
||||
};
|
||||
}
|
||||
|
||||
export interface GloablPermissionsStore {
|
||||
data: SubuserPermission[];
|
||||
setPermissions: Action<GloablPermissionsStore, SubuserPermission[]>;
|
||||
data: PanelPermissions;
|
||||
setPermissions: Action<GloablPermissionsStore, PanelPermissions>;
|
||||
getPermissions: Thunk<GloablPermissionsStore, void, {}, any, Promise<void>>;
|
||||
}
|
||||
|
||||
const permissions: GloablPermissionsStore = {
|
||||
data: [],
|
||||
data: {},
|
||||
|
||||
setPermissions: action((state, payload) => {
|
||||
state.data = payload;
|
||||
|
||||
Reference in New Issue
Block a user