- Issue created by @ptmkenny
- Assigned to jonathanshaw
- Status changed to Needs review
10 months ago 1:51pm 10 March 2024 - 🇯🇵Japan ptmkenny
After thinking about this some more, I think it makes more sense to inject the current user and then get the UID that way. With that approach, it doesn't matter whether the entity is a user entity or not.
- Issue was unassigned.
- Status changed to Needs work
10 months ago 3:05pm 10 March 2024 - 🇯🇵Japan ptmkenny
In fact, injecting the current user is the wrong approach because it assumes that the user saving the user entity is always the same, which is definitely not the case (for example, when an admin edits another user's account). So I again propose the fix in the first post.
- 🇯🇵Japan ptmkenny
In fact, injecting the current user is the wrong approach because it assumes that the user saving the user entity is always the same, which is definitely not the case (for example, when an admin edits another user's account). So I again propose the fix in the first post.
- Assigned to jonathanshaw
- Status changed to Needs review
10 months ago 3:40pm 10 March 2024 - Status changed to Needs work
10 months ago 11:33am 11 March 2024 - 🇬🇧United Kingdom jonathanshaw Stroud, UK
You're right. This validator would be very hard to use sensibly on a non-user entity, however we tweaked it, and we don't do anyone a favour by allowing it.
I like that you used an exception here.
I've added a few nits on the MR, feel free to ignore.
- 🇯🇵Japan ptmkenny
ptmkenny → changed the visibility of the branch enforce_user_entity to hidden.
- 🇯🇵Japan ptmkenny
ptmkenny → changed the visibility of the branch enforce_user_entity to active.
- 🇯🇵Japan ptmkenny
ptmkenny → changed the visibility of the branch enforce_user_entity to active.
- 🇯🇵Japan ptmkenny
ptmkenny → changed the visibility of the branch enforce_user_entity to active.
- 🇯🇵Japan ptmkenny
ptmkenny → changed the visibility of the branch enforce_user_entity to active.
- 🇯🇵Japan ptmkenny
ptmkenny → changed the visibility of the branch enforce_user_entity to active.
-
ptmkenny →
committed a0a6099c on 1.0.x
Issue #3426894 by ptmkenny, jonathanshaw: Validator should check if it...
-
ptmkenny →
committed a0a6099c on 1.0.x
- Issue was unassigned.
- Status changed to Fixed
10 months ago 8:46am 12 March 2024 - 🇬🇧United Kingdom jonathanshaw Stroud, UK
Awesome working with you @ptmkenny :)
Automatically closed - issue fixed for 2 weeks with no activity.