mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-12-22 06:30:59 +01:00
fix timer is shown even without timesheet permissions
This commit is contained in:
parent
9ad73f1ea1
commit
1a37abd472
@ -230,6 +230,11 @@ class timesheet_hooks
|
||||
|
||||
public static function add_timer($data)
|
||||
{
|
||||
// hook is called without check if user has permissions for timesheet app
|
||||
if (empty($GLOBALS['egw_info']['user']['apps']['timesheet']))
|
||||
{
|
||||
return;
|
||||
}
|
||||
$state = Events::timerState();
|
||||
// only send/display if at least one timer is not disabled
|
||||
if (array_diff(['specific', 'overall'], $state['disable'] ?? []))
|
||||
|
Loading…
Reference in New Issue
Block a user