aboutsummaryrefslogtreecommitdiff
path: root/w/class/user.php
diff options
context:
space:
mode:
Diffstat (limited to 'w/class/user.php')
-rw-r--r--w/class/user.php21
1 files changed, 21 insertions, 0 deletions
diff --git a/w/class/user.php b/w/class/user.php
index 3ed831d..77d6ba2 100644
--- a/w/class/user.php
+++ b/w/class/user.php
@@ -30,6 +30,27 @@ class User
{
return $this->level;
}
+
+ public function isvisitor()
+ {
+ return $this->level === Modeluser::FREE;
+ }
+
+ public function canedit()
+ {
+ // a modifier en prenant compte du code invitation de l'article
+ return $this->level >= Modeluser::EDITOR;
+ }
+
+ public function cancreate()
+ {
+ return $this->level >=Modeluser::EDITOR;
+ }
+
+ public function isadmin()
+ {
+ return $this->level === Modeluser::ADMIN;
+ }
}