feat: add app log permission (#4932)

* feat: add app log permission

* fix: org search bug
This commit is contained in:
Finley Ge
2025-05-30 17:09:29 +08:00
committed by archer
parent 5a5367d30b
commit d7b9f94270
10 changed files with 119 additions and 73 deletions

View File

@@ -1,7 +1,8 @@
import { type PerConstructPros, Permission } from '../controller';
import { AppDefaultPermissionVal } from './constant';
import { AppDefaultPermissionVal, AppPermissionList } from './constant';
export class AppPermission extends Permission {
hasLogPer: boolean = false;
constructor(props?: PerConstructPros) {
if (!props) {
props = {
@@ -11,5 +12,11 @@ export class AppPermission extends Permission {
props.per = AppDefaultPermissionVal;
}
super(props);
this.setUpdatePermissionCallback(() => {
this.hasReadPer = this.checkPer(AppPermissionList.read.value);
this.hasWritePer = this.checkPer(AppPermissionList.write.value);
this.hasManagePer = this.checkPer(AppPermissionList.manage.value);
this.hasLogPer = this.checkPer(AppPermissionList.log.value);
});
}
}