浏览代码

fix: old permission format was being used in data module jobs with model id scope

Kristian Vos 9 月之前
父节点
当前提交
583be62824
共有 1 个文件被更改,包括 2 次插入2 次删除
  1. 2 2
      backend/src/modules/DataModule/DataModuleJob.ts

+ 2 - 2
backend/src/modules/DataModule/DataModuleJob.ts

@@ -75,7 +75,7 @@ export default abstract class DataModuleJob extends Job {
 				);
 
 			const permissions = modelIds.map(
-				(modelId: string) => `${this.getPath()}.${modelId}`
+				(modelId: string) => `${this.getPath()}:${modelId}`
 			);
 			await this._context.assertPermissions(permissions);
 
@@ -89,7 +89,7 @@ export default abstract class DataModuleJob extends Job {
 			if (!isValidObjectId(modelId))
 				throw new Error(`Model id is invalid: ${modelId}`);
 			await this._context.assertPermission(
-				`${this.getPath()}.${modelId}`
+				`${this.getPath()}:${modelId}`
 			);
 
 			return;