mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-12-22 14:41:29 +01:00
Add ignore_acl flag to save method
This commit is contained in:
parent
78768ecf7e
commit
b612e26790
@ -309,11 +309,12 @@ class resources_bo
|
|||||||
*
|
*
|
||||||
* Cornelius Weiss <egw@von-und-zu-weiss.de>
|
* Cornelius Weiss <egw@von-und-zu-weiss.de>
|
||||||
* @param array $resource array with key => value of all needed datas
|
* @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
|
* @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!');
|
return lang('You are not permitted to edit this resource!');
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user