X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/timetracker.git/blobdiff_plain/68a5cc5aff88d6144b6db95f7d01315c15e2ebda..2ff04a2baeaa449ab30b822e2bb52ff792776753:/charts.php diff --git a/charts.php b/charts.php index a44c9926..d6707038 100644 --- a/charts.php +++ b/charts.php @@ -46,6 +46,14 @@ if (!$user->isPluginEnabled('ch')) { header('Location: feature_disabled.php'); exit(); } +if ($user->behalf_id && (!$user->can('view_charts') || !$user->checkBehalfId())) { + header('Location: access_denied.php'); // Trying on behalf, but no right or wrong user. + exit(); +} +if (!$user->behalf_id && !$user->can('view_own_charts') && !$user->adjustBehalfId()) { + header('Location: access_denied.php'); // Trying as self, but no right for self, and noone to view on behalf. + exit(); +} // Initialize and store date in session. $cl_date = $request->getParameter('date', @$_SESSION['date']);