Unverified Commit 4a5d8ada authored by Côme Chilliet's avatar Côme Chilliet
Browse files

:ambulance: fix(webservice) Fix permissive ACL check for deleting an attribute

issue #6126
Showing with 2 additions and 2 deletions
+2 -2
......@@ -481,8 +481,8 @@ class fdRestService extends fdRPCService
throw new WebServiceError('Inactive tab', 400);
}
if (!$object->attrIsReadable($attribute)) {
throw new WebServiceError('Not enough rights to read "'.$attribute.'"', 403);
if (!$object->attrIsWriteable($attribute)) {
throw new WebServiceError('Not enough rights to delete "'.$attribute.'"', 403);
}
$object->attributesAccess[$attribute]->resetToDefault();
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment