Commit 124f3ad4 authored by bmortier's avatar bmortier

Merge branch 'cherry-pick-5248f763' into HEAD

parents 71c831dd 7565026a
......@@ -186,7 +186,7 @@ class fdRPCService
protected function _ls ($type, $attrs = NULL, $ou = NULL, $filter = '')
{
$this->checkAccess($type);
return objects::ls($type, $attrs, $ou, $filter);
return objects::ls($type, $attrs, $ou, $filter, TRUE);
}
/*!
......@@ -194,8 +194,15 @@ class fdRPCService
*/
protected function _count ($type, $ou = NULL, $filter = '')
{
global $ui;
$this->checkAccess($type);
return objects::count($type, $ou, $filter);
$infos = objects::infos($type);
$acl = $infos['aclCategory'].'/'.$infos['mainTab'];
if (strpos($ui->get_permissions($ou, $acl), 'r') !== FALSE) {
return objects::count($type, $ou, $filter);
} else {
return count(objects::ls($type, NULL, $ou, $filter, TRUE));
}
}
/*!
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment