From 1ce097c4e947259cb232c2f34ec34b41d36b6c2d Mon Sep 17 00:00:00 2001 From: printempw Date: Thu, 28 Jul 2016 15:02:47 +0800 Subject: [PATCH] add new permission for super administrators --- app/Models/User.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/Models/User.php b/app/Models/User.php index 2a55de9a..66ce152a 100644 --- a/app/Models/User.php +++ b/app/Models/User.php @@ -54,7 +54,8 @@ class User $this->password = $this->eloquent_model->password; $this->token = md5($this->email . $this->password . $_ENV['SALT']); $this->closet = new Closet($this->uid); - $this->is_admin = ($this->eloquent_model->permission == 1); + $this->is_admin = $this->eloquent_model->permission == 1 || + $this->eloquent_model->permission == 2; } }