summaryrefslogtreecommitdiffstats
path: root/inc/user.inc.php
diff options
context:
space:
mode:
Diffstat (limited to 'inc/user.inc.php')
-rw-r--r--inc/user.inc.php6
1 files changed, 6 insertions, 0 deletions
diff --git a/inc/user.inc.php b/inc/user.inc.php
index b988bbeb..38e57e33 100644
--- a/inc/user.inc.php
+++ b/inc/user.inc.php
@@ -17,6 +17,12 @@ class User
return self::$user['fullname'];
}
+ public static function hasPermission($permission)
+ {
+ if (self::$user === false) return false;
+ return (self::$user['permissions'] & Permission::get($permission)) != 0;
+ }
+
public static function load()
{
if (Session::load()) {