fix timer is shown even without timesheet permissions

This commit is contained in:
ralf 2023-01-30 16:59:48 +01:00
parent 9ad73f1ea1
commit 1a37abd472

View File

@ -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'] ?? []))