From cae0f210a2b4e081ada6b8c836b163c650d468ce Mon Sep 17 00:00:00 2001 From: jribal Date: Wed, 1 Apr 2020 11:09:40 +0100 Subject: [PATCH] On _checkAccessToResource: category -> categorie --- htdocs/categories/class/api_categories.class.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/htdocs/categories/class/api_categories.class.php b/htdocs/categories/class/api_categories.class.php index 868d149691a..d6eff682908 100644 --- a/htdocs/categories/class/api_categories.class.php +++ b/htdocs/categories/class/api_categories.class.php @@ -231,7 +231,7 @@ class Categories extends DolibarrApi throw new RestException(404, 'category not found'); } - if (!DolibarrApi::_checkAccessToResource('category', $this->category->id)) { + if (!DolibarrApi::_checkAccessToResource('categorie', $this->category->id)) { throw new RestException(401, 'Access not allowed for login '.DolibarrApiAccess::$user->login); } @@ -266,7 +266,7 @@ class Categories extends DolibarrApi throw new RestException(404, 'category not found'); } - if (!DolibarrApi::_checkAccessToResource('category', $this->category->id)) { + if (!DolibarrApi::_checkAccessToResource('categorie', $this->category->id)) { throw new RestException(401, 'Access not allowed for login '.DolibarrApiAccess::$user->login); } @@ -755,7 +755,7 @@ class Categories extends DolibarrApi throw new RestException(404, 'category not found'); } - if (!DolibarrApi::_checkAccessToResource('category', $this->category->id)) { + if (!DolibarrApi::_checkAccessToResource('categorie', $this->category->id)) { throw new RestException(401, 'Access not allowed for login '.DolibarrApiAccess::$user->login); }