Fix read knowledgemanagement categories
This commit is contained in:
parent
0a623ab068
commit
3719366e04
@ -305,7 +305,8 @@ class Categories extends DolibarrApi
|
||||
Categorie::TYPE_CUSTOMER,
|
||||
Categorie::TYPE_SUPPLIER,
|
||||
Categorie::TYPE_MEMBER,
|
||||
Categorie::TYPE_PROJECT
|
||||
Categorie::TYPE_PROJECT,
|
||||
Categorie::TYPE_KNOWLEDGEMANAGEMENT
|
||||
])) {
|
||||
throw new RestException(401);
|
||||
}
|
||||
@ -322,6 +323,8 @@ class Categories extends DolibarrApi
|
||||
throw new RestException(401);
|
||||
} elseif ($type == Categorie::TYPE_PROJECT && !DolibarrApiAccess::$user->rights->projet->lire) {
|
||||
throw new RestException(401);
|
||||
} elseif ($type == Categorie::TYPE_KNOWLEDGEMANAGEMENT && !DolibarrApiAccess::$user->rights->knowledgemanagement->knowledgerecord->read) {
|
||||
throw new RestException(401);
|
||||
}
|
||||
|
||||
$categories = $this->category->getListForItem($id, $type, $sortfield, $sortorder, $limit, $page);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user