Added GET API call for group-permissions
This commit is contained in:
@@ -120,4 +120,13 @@ class API_permissions extends API
|
||||
|
||||
return $access_rights;
|
||||
}
|
||||
|
||||
public function getUserGroupPermissions()
|
||||
{
|
||||
list($query, $types, $params) = $this->buildDynamicQuery('system_user_group_permissions');
|
||||
|
||||
$items = $this->generalGetFunction($query, $types, $params, false, 'userGroupPermissions');
|
||||
|
||||
return ($items);
|
||||
}
|
||||
}
|
||||
@@ -11,7 +11,11 @@ $API_permissions = new API_permissions();
|
||||
$API_usergroups = new API_usergroups();
|
||||
|
||||
if ($API_permissions->request_method === 'GET') {
|
||||
# to be made, get all the access-rights and implement the builder
|
||||
$API_usergroups->checkPermissions('admin-access-control-permissions', 'RO');
|
||||
|
||||
$permissions = $API_permissions->getUserGroupPermissions();
|
||||
|
||||
$API_permissions->apiOutput($code = 200, ['success' => $permissions]);
|
||||
|
||||
} elseif ($API_permissions->request_method === 'PUT') {
|
||||
# when called from the frontend will not be forwarding to a url since when its called from the frontend it doesnt need a redirection
|
||||
|
||||
Reference in New Issue
Block a user