Fix ACLs in API calls (fix vatesfr/xo-web#870).
This commit is contained in:
parent
36f5084c52
commit
2ce5735676
@ -113,7 +113,10 @@ function resolveParams (method, params) {
|
|||||||
// Register this new value.
|
// Register this new value.
|
||||||
params[key] = object
|
params[key] = object
|
||||||
|
|
||||||
if (!permissions) {
|
// Permission default to 'administrate' but can be set to a falsy
|
||||||
|
// value (except null or undefined which trigger the default
|
||||||
|
// value) to simply do a resolve without checking any permissions.
|
||||||
|
if (permission) {
|
||||||
permissions.push([ object.id, permission ])
|
permissions.push([ object.id, permission ])
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
Loading…
Reference in New Issue
Block a user