Add deleteMyProfile for profile rules
Admins can't delete themselves O_o
This commit is contained in:
parent
212208c430
commit
cacaa46f0f
1 changed files with 5 additions and 0 deletions
|
@ -134,6 +134,11 @@ class Profile extends Rules
|
|||
&& ! $this->curUser->isGuest;
|
||||
}
|
||||
|
||||
protected function getdeleteMyProfile(): bool
|
||||
{
|
||||
return $this->my && ! $this->user->isAdmin;
|
||||
}
|
||||
|
||||
protected function getviewIP(): bool
|
||||
{
|
||||
return $this->user->isAdmin;;
|
||||
|
|
Loading…
Add table
Reference in a new issue