feat(P19AI1-1,P19AI1-2): 实现AI建议引擎与权限门禁后端
这个提交包含在:
@@ -45,6 +45,13 @@ describe("Permission Constants", () => {
|
||||
});
|
||||
|
||||
|
||||
it("grants ai.assist only to finance manager and admin", () => {
|
||||
expect(hasPermission(resolvePermissionsForRoles(["finance_mgr"]), "ai.assist")).toBe(true);
|
||||
expect(hasPermission(resolvePermissionsForRoles(["finance"]), "ai.assist")).toBe(false);
|
||||
expect(hasPermission(resolvePermissionsForRoles(["manager"]), "ai.assist")).toBe(false);
|
||||
expect(hasPermission(resolvePermissionsForRoles(["admin"]), "ai.assist")).toBe(true);
|
||||
});
|
||||
|
||||
it("grants asset permissions to configured roles", () => {
|
||||
expect(hasPermission(resolvePermissionsForRoles(["employee"]), "asset.view_own")).toBe(true);
|
||||
expect(hasPermission(resolvePermissionsForRoles(["manager"]), "asset.view_all")).toBe(true);
|
||||
|
||||
在新工单中引用
屏蔽一个用户