X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=invoices.php;h=1723a8d1dc698f42af6b9c2825fd550a62d38f58;hb=54c7f39c93815e99c45f3f974a4ec14673fee1b2;hp=a014472f3920c80b4e1b1d8a2de7c158978dadfd;hpb=3ad790a3d4bc23cb23f7ee072171ca6ef987eb56;p=timetracker.git diff --git a/invoices.php b/invoices.php index a014472f..1723a8d1 100644 --- a/invoices.php +++ b/invoices.php @@ -30,15 +30,19 @@ require_once('initialize.php'); import('form.Form'); import('ttTeamHelper'); -// Access check. -if (!ttAccessCheck(right_view_invoices) || !$user->isPluginEnabled('iv')) { +// Access checks. +if (!(ttAccessAllowed('manage_invoices') || ttAccessAllowed('view_own_invoices'))) { header('Location: access_denied.php'); exit(); } +if (!$user->isPluginEnabled('iv')) { + header('Location: feature_disabled.php'); + exit(); +} $invoices = ttTeamHelper::getActiveInvoices(); $smarty->assign('invoices', $invoices); -$smarty->assign('title', $i18n->getKey('title.invoices')); +$smarty->assign('title', $i18n->get('title.invoices')); $smarty->assign('content_page_name', 'invoices.tpl'); $smarty->display('index.tpl');