-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix item based promotion issue #1811
Fix item based promotion issue #1811
Conversation
@@ -79,6 +79,7 @@ protected function createUser($email, $password, $enabled = true, array $roles = | |||
$user = $this->getUserRepository()->createNew(); | |||
$user->setFirstname($this->faker->firstName); | |||
$user->setLastname($this->faker->lastName); | |||
$user->setUsername($email); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is not enough, see #1809.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@stloyd OK, thanks. This was enough for me to load fixtures. Not related to this fix anyway.
ec49888
to
2210154
Compare
@pjedrzejewski This should be ready, kindly review. |
ping @pjedrzejewski |
Fix item based promotion issue
} catch (UnsupportedTypeException $exception) { | ||
if (!$eligibleRules) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What if the first rule throws an exception? This would set eligible to false prematurely. Perhaps we should do something that's more like the AuthorizationDecisionManager and rules could be more like voters. Then we could allow rules to abstain from certain votes.
Steps to reproduce:
Thanks for reporting it @kayue!