Files
hats-app/types/rbac.ts
T
Ichsan Kurniawan 751b28fab2 Add RBAC menu and role management
Adds permission, menu, and role administration with hierarchical access controls, plus admin breadcrumbs and a redirect from the legacy user-role page. Remove `credentials.md` before committing; it contains server credentials.
2026-11-05 19:01:40 +07:00

59 lines
1.1 KiB
TypeScript

export interface IPermission {
id?: number;
name: string;
description?: string;
status?: {
id?: number;
code?: string;
name?: string;
};
created_at?: string;
updated_at?: string;
}
export interface IMenu {
id?: number;
code?: string;
name: string;
path_url: string;
description?: string;
icon?: string;
is_admin_menu?: boolean;
menu_parent_id?: number | null;
action?: string[];
status?: {
id?: number;
code?: string;
name?: string;
};
children?: IMenu[];
menu_level?: number;
}
export interface IRoleDetail {
menu_id: number;
menu_name: string;
menu_path: string;
is_admin_menu: boolean;
action: string[];
}
export interface IRole {
id?: number;
code?: string;
name: string;
description?: string;
allow_admin_panel?: boolean;
allow_admin?: boolean;
role_detail?: IRoleDetail[];
privilege?: any[];
status?: {
id?: number;
code?: string;
name?: string;
};
created_at?: string;
updated_at?: string;
}