Commit 5248f763 authored by Côme Chilliet's avatar Côme Chilliet

Merge branch 'backport-5704' into '1.2-fixes'

Backport 5704

See merge request fusiondirectory/fd-plugins!180
parents 62957f12 2e602f32
......@@ -194,7 +194,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);
}
/*!
......@@ -202,8 +202,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