summaryrefslogtreecommitdiff
path: root/includes/controller/user_worklog_controller.php
diff options
context:
space:
mode:
Diffstat (limited to 'includes/controller/user_worklog_controller.php')
-rw-r--r--includes/controller/user_worklog_controller.php3
1 files changed, 1 insertions, 2 deletions
diff --git a/includes/controller/user_worklog_controller.php b/includes/controller/user_worklog_controller.php
index 4eaa5e91..bf0eb1cf 100644
--- a/includes/controller/user_worklog_controller.php
+++ b/includes/controller/user_worklog_controller.php
@@ -182,10 +182,9 @@ function user_worklog_delete_link($userWorkLog, $parameters = [])
*/
function user_worklog_controller()
{
- global $privileges;
$user = auth()->user();
- if (!in_array('admin_user_worklog', $privileges)) {
+ if (!auth()->can('admin_user_worklog')) {
redirect(user_link($user->id));
}