feat(P17A-1,P17A-2): 新增采购模型权限与系统种子

这个提交包含在:
2026-03-07 20:59:28 +08:00
父节点 9de1169d78
当前提交 1cd4290b4d
共修改 8 个文件,包含 354 行新增和 18 行删除
+21 -1
查看文件
@@ -16,6 +16,12 @@ const LEAVE_SELF_SERVICE_PERMISSIONS = [
"leave.submit",
];
const PROCUREMENT_SELF_SERVICE_PERMISSIONS = [
"procurement.create",
"procurement.view_own",
"procurement.submit",
];
const MASTERDATA_VIEW_PERMISSIONS = ["masterdata.view"];
const MASTERDATA_MANAGE_PERMISSIONS = ["masterdata.manage"];
@@ -74,25 +80,34 @@ const ENTITY_PERMISSION_MAP = {
};
const ROLE_PERMISSIONS = {
employee: EMPLOYEE_BASE_PERMISSIONS,
employee: [
...EMPLOYEE_BASE_PERMISSIONS,
...PROCUREMENT_SELF_SERVICE_PERMISSIONS,
],
manager: [
...EMPLOYEE_BASE_PERMISSIONS,
...PROCUREMENT_SELF_SERVICE_PERMISSIONS,
"expense.approve",
"expense.transfer",
"expense.view_all",
"leave.approve",
"procurement.approve",
"procurement.view_all",
"report.dashboard.view",
"budget.view",
"budget.manage",
],
ceo: [
...EMPLOYEE_BASE_PERMISSIONS,
...PROCUREMENT_SELF_SERVICE_PERMISSIONS,
...MASTERDATA_VIEW_PERMISSIONS,
"expense.approve",
"expense.transfer",
"expense.view_all",
"leave.approve",
"leave.view_all",
"procurement.approve",
"procurement.view_all",
"report.dashboard.view",
"budget.view",
],
@@ -106,6 +121,7 @@ const ROLE_PERMISSIONS = {
"expense.approve",
"expense.finance.pay",
"expense.view_all",
"procurement.view_all",
],
finance_mgr: [
...EMPLOYEE_BASE_PERMISSIONS,
@@ -121,12 +137,16 @@ const ROLE_PERMISSIONS = {
"expense.finance.pay",
"expense.view_all",
"expense.finance.override_duplicate",
"procurement.view_all",
"procurement.manage",
"system.settings",
"system.audit.view",
],
administration: [
"expense.proxy_submit",
...EMPLOYEE_BASE_PERMISSIONS,
"procurement.view_all",
"procurement.manage",
],
hr: [
...LEAVE_SELF_SERVICE_PERMISSIONS,