mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-12-26 00:29:38 +01:00
* Timesheet: do not show deactivated accounts for creating new timesheets (keeping them in list header)
This commit is contained in:
parent
cc7709908c
commit
329a6956fe
@ -280,15 +280,18 @@ class timesheet_bo extends Api\Storage
|
|||||||
/**
|
/**
|
||||||
* get list of specified grants as uid => Username pairs
|
* get list of specified grants as uid => Username pairs
|
||||||
*
|
*
|
||||||
* @param int $required =EGW_ACL_READ
|
* @param int $required =Acl::READ
|
||||||
|
* @param boolean $hide_deactive =null default only Acl::EDIT hides deactivates users
|
||||||
* @return array with uid => Username pairs
|
* @return array with uid => Username pairs
|
||||||
*/
|
*/
|
||||||
function grant_list($required=EGW_ACL_READ)
|
function grant_list($required=Acl::READ, $hide_deactive=null)
|
||||||
{
|
{
|
||||||
|
if (!isset($hide_deactive)) $hide_deactive = $required == Acl::EDIT;
|
||||||
|
|
||||||
$result = array();
|
$result = array();
|
||||||
foreach($this->grants as $uid => $grant)
|
foreach($this->grants as $uid => $grant)
|
||||||
{
|
{
|
||||||
if ($grant & $required)
|
if ($grant & $required && (!$hide_deactive || Api\Accounts::getInstance()->is_active($uid)))
|
||||||
{
|
{
|
||||||
$result[$uid] = Api\Accounts::username($uid);
|
$result[$uid] = Api\Accounts::username($uid);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user