在dev环境下输出权限检测不通过的case

This commit is contained in:
Xu Chang 2023-07-25 10:20:26 +08:00
parent 5a2651a4c3
commit e3b215bbf2
2 changed files with 12 additions and 0 deletions

View File

@ -1911,10 +1911,16 @@ var RelationAuth = /** @class */ (function () {
if (result) { if (result) {
return checkChildren(); return checkChildren();
} }
if (process.env.NODE_ENV === 'development') {
console.warn('对象operate权限检查不通过', node);
}
return false; return false;
} }
if (realLegalPaths.length === 0) { if (realLegalPaths.length === 0) {
if (node === tree) { if (node === tree) {
if (process.env.NODE_ENV === 'development') {
console.warn('对象operate权限检查不通过', node);
}
return false; return false;
} }
// 如果不是tree的根结点相对路径上的actionAuth找不到还可以尝试从自身的filter去重试其它路径 // 如果不是tree的根结点相对路径上的actionAuth找不到还可以尝试从自身的filter去重试其它路径

View File

@ -2289,11 +2289,17 @@ export class RelationAuth<ED extends EntityDict & BaseEntityDict>{
if (result) { if (result) {
return checkChildren(); return checkChildren();
} }
if (process.env.NODE_ENV === 'development') {
console.warn('对象operate权限检查不通过', node);
}
return false; return false;
} }
if (realLegalPaths.length === 0) { if (realLegalPaths.length === 0) {
if (node === tree) { if (node === tree) {
if (process.env.NODE_ENV === 'development') {
console.warn('对象operate权限检查不通过', node);
}
return false; return false;
} }
// 如果不是tree的根结点相对路径上的actionAuth找不到还可以尝试从自身的filter去重试其它路径 // 如果不是tree的根结点相对路径上的actionAuth找不到还可以尝试从自身的filter去重试其它路径