diff options
author | Simon Rettberg | 2013-10-29 20:02:30 +0100 |
---|---|---|
committer | Simon Rettberg | 2013-10-29 20:02:30 +0100 |
commit | 010656745dd6f7db6b09ec501ad3bb1e202b9a96 (patch) | |
tree | 2900c8daafe4b0b79cd6766348eb6db0b763bc54 /inc/user.inc.php | |
parent | DB-Support, add user functionality (diff) | |
download | slx-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.php | 6 |
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()) { |