update permission
This commit is contained in:
@@ -7,11 +7,18 @@ export interface Permission {
|
||||
nameLangId?: string;
|
||||
name?: string;
|
||||
description?: string;
|
||||
builtin?: boolean;
|
||||
protectedPermission?: boolean;
|
||||
ownerType?: AuthOwnerType;
|
||||
ownerId?: string;
|
||||
createdBy?: string;
|
||||
createdAt?: number;
|
||||
updatedAt?: number;
|
||||
deletedAt?: number;
|
||||
}
|
||||
|
||||
export type AuthOwnerType = "SYSTEM" | "MODULE" | "TENANT" | "STORE" | "USER";
|
||||
|
||||
export type PermissionPayload = Pick<Permission, "moduleCode" | "code" | "nameLangId" | "name" | "description"> & {
|
||||
id?: string;
|
||||
};
|
||||
|
||||
+15
-2
@@ -1,4 +1,4 @@
|
||||
import type { ModuleCode, Permission } from "./Permission";
|
||||
import type { AuthOwnerType, ModuleCode, Permission } from "./Permission";
|
||||
import { Model } from "./Model";
|
||||
|
||||
export type Role = {
|
||||
@@ -7,18 +7,31 @@ export type Role = {
|
||||
nameLangId?: string;
|
||||
name?: string;
|
||||
description?: string;
|
||||
builtin?: boolean;
|
||||
protectedRole?: boolean;
|
||||
parentRoleId?: string;
|
||||
ownerType?: AuthOwnerType;
|
||||
ownerId?: string;
|
||||
createdBy?: string;
|
||||
|
||||
permissionList?: Permission[];
|
||||
allPermissionList?: Permission[];
|
||||
childRoleList?: Role[];
|
||||
parentRole?: Role;
|
||||
delegationPermissionList?: Permission[];
|
||||
permissionIdList?: string[];
|
||||
childRoleIdList?: string[];
|
||||
delegationPermissionIdList?: string[];
|
||||
} & Model;
|
||||
|
||||
export type RolePayload = Pick<Role, "moduleCode" | "code" | "nameLangId" | "name" | "description"> & {
|
||||
export type RolePayload = Partial<Pick<Role, "moduleCode" | "code" | "nameLangId" | "name" | "description">> & {
|
||||
id?: string;
|
||||
parentRoleId?: string;
|
||||
ownerType?: AuthOwnerType;
|
||||
ownerId?: string;
|
||||
permissionIdList?: string[];
|
||||
childRoleIdList?: string[];
|
||||
delegationPermissionIdList?: string[];
|
||||
};
|
||||
|
||||
export interface AuthorizeUserRole {
|
||||
|
||||
Reference in New Issue
Block a user