Add deleteMyProfile for profile rules

Admins can't delete themselves O_o
This commit is contained in:
Visman 2023-07-19 17:38:13 +07:00
parent 212208c430
commit cacaa46f0f

View file

@ -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;;