X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=invoices.php;h=1723a8d1dc698f42af6b9c2825fd550a62d38f58;hb=a711e76851f29c7e0ac290a279eb4dd984ea7167;hp=f495292e1144059b7b3fb06c934171bde21f99b3;hpb=098a79f0819ebb89b7d48df4a6b154af4560f68e;p=timetracker.git diff --git a/invoices.php b/invoices.php index f495292e..1723a8d1 100644 --- a/invoices.php +++ b/invoices.php @@ -30,16 +30,19 @@ require_once('initialize.php'); import('form.Form'); import('ttTeamHelper'); -// Access check. -if (!ttAccessCheck(right_view_invoices)) { +// 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'); -?> \ No newline at end of file