* updated to Symfony 4.1 #149 * updated to phpunit 7 #149 * downgrade ocramius/proxy-manager for PHP 7.1 compatibility #149 * fixed symfony deprecations #149 * replaced AdvancedUserInterface with custom user checker * code sniffer fixes
This commit is contained in:
@@ -79,22 +79,22 @@ class UserVoter extends AbstractVoter
|
||||
case self::ROLES:
|
||||
return $this->canAdminUsers($token);
|
||||
case self::PREFERENCES:
|
||||
return $this->canEditPreferences($subject, $user, $token);
|
||||
return $this->canEditPreferences($subject, $user, $token);
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param User $profile
|
||||
* @param User $user
|
||||
* @param TokenInterface $token
|
||||
* @return bool
|
||||
*/
|
||||
/**
|
||||
* @param User $profile
|
||||
* @param User $user
|
||||
* @param TokenInterface $token
|
||||
* @return bool
|
||||
*/
|
||||
protected function canEditPreferences(User $profile, User $user, TokenInterface $token)
|
||||
{
|
||||
return $profile->getId() == $user->getId();
|
||||
}
|
||||
{
|
||||
return $profile->getId() == $user->getId();
|
||||
}
|
||||
|
||||
/**
|
||||
* @param User $profile
|
||||
|
||||
Reference in New Issue
Block a user