From c33940f64a1e5b59afd700010247382f5b7b2df3 Mon Sep 17 00:00:00 2001 From: Igor Scheller Date: Mon, 12 Nov 2018 14:41:23 +0100 Subject: Moved permission checks to Authenticator class --- includes/view/ShiftTypes_view.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'includes/view/ShiftTypes_view.php') diff --git a/includes/view/ShiftTypes_view.php b/includes/view/ShiftTypes_view.php index 72d119ff..634f9760 100644 --- a/includes/view/ShiftTypes_view.php +++ b/includes/view/ShiftTypes_view.php @@ -6,8 +6,7 @@ */ function ShiftType_name_render($shifttype) { - global $privileges; - if (in_array('shifttypes', $privileges)) { + if (auth()->can('shifttypes')) { return '' . $shifttype['name'] . ''; } return $shifttype['name']; -- cgit v1.2.3-54-g00ecf