refs #4074 refactor user-acl
gitea/salix/pipeline/head There was a failure building this commit
Details
gitea/salix/pipeline/head There was a failure building this commit
Details
This commit is contained in:
parent
d9cf194873
commit
ee9fba212c
|
@ -24,18 +24,11 @@ module.exports = Self => {
|
||||||
});
|
});
|
||||||
|
|
||||||
Self.userAcl = async function(ctx, aclList) {
|
Self.userAcl = async function(ctx, aclList) {
|
||||||
let models = Self.app.models;
|
const ACLs = [];
|
||||||
|
|
||||||
let ACLs = [];
|
|
||||||
|
|
||||||
for (let key in aclList) {
|
for (let key in aclList) {
|
||||||
let acl = await models.ACL.findOne({
|
const acl = await Self.app.models.ACL.findOne({where: {principalId: key}});
|
||||||
where: {
|
if (acl) ACLs.push(acl);
|
||||||
principalId: key,
|
|
||||||
}
|
|
||||||
});
|
|
||||||
if (acl)
|
|
||||||
ACLs.push(acl);
|
|
||||||
}
|
}
|
||||||
return ACLs;
|
return ACLs;
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue