aboutsummaryrefslogtreecommitdiff
path: root/w/class/user.php
diff options
context:
space:
mode:
authorvincent-peugnet <v.peugnet@free.fr>2018-10-28 19:56:27 +0100
committervincent-peugnet <v.peugnet@free.fr>2018-10-28 19:56:27 +0100
commite17392e46259e6f2e012017987cf7c31c171488f (patch)
tree72b61b63e32819e81433e8df6f14dc92b0e3a604 /w/class/user.php
parenta91c916248f967da2d4218b575e665242b7c975b (diff)
downloadwcms-e17392e46259e6f2e012017987cf7c31c171488f.tar.gz
wcms-e17392e46259e6f2e012017987cf7c31c171488f.zip
abstract config NWY
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;
+ }
}