summaryrefslogtreecommitdiffstats
path: root/inc/user.inc.php
diff options
context:
space:
mode:
authorSimon Rettberg2013-10-29 20:02:30 +0100
committerSimon Rettberg2013-10-29 20:02:30 +0100
commit010656745dd6f7db6b09ec501ad3bb1e202b9a96 (patch)
tree2900c8daafe4b0b79cd6766348eb6db0b763bc54 /inc/user.inc.php
parentDB-Support, add user functionality (diff)
downloadslx-admin-010656745dd6f7db6b09ec501ad3bb1e202b9a96.tar.gz
slx-admin-010656745dd6f7db6b09ec501ad3bb1e202b9a96.tar.xz
slx-admin-010656745dd6f7db6b09ec501ad3bb1e202b9a96.zip
First version of basic minilinux configuration
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()) {