Pārlūkot izejas kodu

Change Profile rights

Visman 5 gadi atpakaļ
vecāks
revīzija
278c756a93
1 mainītis faili ar 8 papildinājumiem un 2 dzēšanām
  1. 8 2
      app/Models/Rules/Profile.php

+ 8 - 2
app/Models/Rules/Profile.php

@@ -76,12 +76,18 @@ class Profile extends Rules
 
 
     protected function getbanUser()
     protected function getbanUser()
     {
     {
-        return ! $this->my && ($this->admin || ($this->moderator && '1' == $this->user->g_mod_ban_users));
+        return ! $this->my
+            && ($this->admin || ($this->moderator && '1' == $this->user->g_mod_ban_users))
+            && ! $this->curUser->isAdmMod
+            && ! $this->curUser->isGuest;
     }
     }
 
 
     protected function getdeleteUser()
     protected function getdeleteUser()
     {
     {
-        return ! $this->my && $this->admin;
+        return ! $this->my
+            && $this->admin
+            && ! $this->curUser->isAdmMod
+            && ! $this->curUser->isGuest;
     }
     }
 
 
     protected function getviewIP()
     protected function getviewIP()