On _checkAccessToResource: category -> categorie

This commit is contained in:
jribal 2020-04-01 11:09:40 +01:00 committed by Laurent Destailleur
parent 5135474232
commit 7380fa32ec

View File

@ -226,7 +226,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);
}
@ -261,7 +261,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);
}
@ -750,7 +750,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);
}