From 2cd75410429c3614ca7e3c4ee3dd2b630760dc38 Mon Sep 17 00:00:00 2001 From: Marcin Kurczewski Date: Sun, 6 Oct 2013 19:20:54 +0200 Subject: [PATCH] Fixed bug in privilege checking --- src/Helpers/PrivilegesHelper.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Helpers/PrivilegesHelper.php b/src/Helpers/PrivilegesHelper.php index 8fe7f642..99afcc26 100644 --- a/src/Helpers/PrivilegesHelper.php +++ b/src/Helpers/PrivilegesHelper.php @@ -17,9 +17,9 @@ class PrivilegesHelper public static function confirm($user, $privilege) { $minAccessRank = isset(self::$privileges[$privilege]) - ? AccessRank::Admin - : self::$privileges[$privilege]; - return $user->access_rank >= $minAccessRank; + ? self::$privileges[$privilege] + : AccessRank::Admin; + return intval($user->access_rank) >= $minAccessRank; } public static function confirmWithException($user, $privilege)