Fix ACLs in API calls (fix vatesfr/xo-web#870).

This commit is contained in:
Julien Fontanet 2016-04-08 11:05:17 +02:00
parent 36f5084c52
commit 2ce5735676

View File

@ -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 ])
} }
}) })