refs #4074 @2h change the acl service to take in consideration diferent permission types
gitea/salix/pipeline/head There was a failure building this commit Details

This commit is contained in:
Pau 2023-01-23 12:35:03 +01:00
parent 1572f21901
commit 521586caed
2 changed files with 10 additions and 2 deletions

View File

@ -43,7 +43,15 @@ class AclService {
hasAnyACL(model, property, accessType) { hasAnyACL(model, property, accessType) {
if (this.acls) { if (this.acls) {
if (this.acls[model]) { if (this.acls[model]) {
if (this.acls[model]['*']) {
if (this.acls[model]['*']['*'])
return true;
if (this.acls[model]['*'][accessType])
return true;
}
if (this.acls[model][property]) { if (this.acls[model][property]) {
if (this.acls[model][property]['*'])
return true;
if (this.acls[model][property][accessType]) if (this.acls[model][property][accessType])
return true; return true;
} }

View File

@ -21,10 +21,10 @@
"type": "array" "type": "array"
}, },
"defaultPriority": { "defaultPriority": {
"type": "int" "type": "number"
}, },
"defaultTag": { "defaultTag": {
"type": "int" "type": "number"
} }
}, },
"relations": { "relations": {