Merge branch '13.0' of git@github.com:Dolibarr/dolibarr.git into 14.0
This commit is contained in:
commit
3ce5674b76
@ -69,7 +69,7 @@ class MyModuleApi extends DolibarrApi
|
|||||||
*/
|
*/
|
||||||
public function get($id)
|
public function get($id)
|
||||||
{
|
{
|
||||||
if (!DolibarrApiAccess::$user->rights->mymodule->read) {
|
if (!DolibarrApiAccess::$user->rights->mymodule->myobject->read) {
|
||||||
throw new RestException(401);
|
throw new RestException(401);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -205,7 +205,7 @@ class MyModuleApi extends DolibarrApi
|
|||||||
*/
|
*/
|
||||||
public function post($request_data = null)
|
public function post($request_data = null)
|
||||||
{
|
{
|
||||||
if (!DolibarrApiAccess::$user->rights->mymodule->write) {
|
if (!DolibarrApiAccess::$user->rights->mymodule->myobject->write) {
|
||||||
throw new RestException(401);
|
throw new RestException(401);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -238,7 +238,7 @@ class MyModuleApi extends DolibarrApi
|
|||||||
*/
|
*/
|
||||||
public function put($id, $request_data = null)
|
public function put($id, $request_data = null)
|
||||||
{
|
{
|
||||||
if (!DolibarrApiAccess::$user->rights->mymodule->write) {
|
if (!DolibarrApiAccess::$user->rights->mymodule->myobject->write) {
|
||||||
throw new RestException(401);
|
throw new RestException(401);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -280,7 +280,7 @@ class MyModuleApi extends DolibarrApi
|
|||||||
*/
|
*/
|
||||||
public function delete($id)
|
public function delete($id)
|
||||||
{
|
{
|
||||||
if (!DolibarrApiAccess::$user->rights->mymodule->delete) {
|
if (!DolibarrApiAccess::$user->rights->mymodule->myobject->delete) {
|
||||||
throw new RestException(401);
|
throw new RestException(401);
|
||||||
}
|
}
|
||||||
$result = $this->myobject->fetch($id);
|
$result = $this->myobject->fetch($id);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user