From b612e267904e0be2631cb42dd56e8b5de417160c Mon Sep 17 00:00:00 2001 From: Hadi Nategh Date: Mon, 7 Dec 2020 14:14:26 +0100 Subject: [PATCH] Add ignore_acl flag to save method --- resources/inc/class.resources_bo.inc.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/resources/inc/class.resources_bo.inc.php b/resources/inc/class.resources_bo.inc.php index 753fffa770..c0515437a8 100755 --- a/resources/inc/class.resources_bo.inc.php +++ b/resources/inc/class.resources_bo.inc.php @@ -309,11 +309,12 @@ class resources_bo * * Cornelius Weiss * @param array $resource array with key => value of all needed datas + * @param boolean $ignore_acl ignores acl check if set to true * @return string|boolean msg if somthing went wrong or false in failure; resource id if all right */ - function save($resource) + function save($resource, $ignore_acl=false) { - if(!$this->acl->is_permitted($resource['cat_id'],Acl::EDIT)) + if(!$ignore_acl && !$this->acl->is_permitted($resource['cat_id'],Acl::EDIT)) { return lang('You are not permitted to edit this resource!'); }