public canEditUser ( Scalr_Account_User $user ) : boolean | ||
$user | Scalr_Account_User | The user to edit |
return | boolean | Returns true if the user is allowed to edit specified user |
public function canEditUser($user)
{
return !$this->isTeamUser() && $user->getAccountId() == $this->getAccountId() && ($this->getId() == $user->getId() || $this->isAccountOwner() || $this->isAccountSuperAdmin() && !$user->isAccountOwner() || $this->isAccountAdmin() && !$user->isAccountOwner() && !$user->isAccountSuperAdmin());
}