On _checkAccessToResource: category -> categorie
This commit is contained in:
parent
b407797ca3
commit
cae0f210a2
@ -231,7 +231,7 @@ class Categories extends DolibarrApi
|
|||||||
throw new RestException(404, 'category not found');
|
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);
|
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');
|
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);
|
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');
|
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);
|
throw new RestException(401, 'Access not allowed for login '.DolibarrApiAccess::$user->login);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user