Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Reproduce steps:
- for an entity create a user entity reference field
- create a custom role
- configure the selection based on roles, selecting the custom role created above
- create a few users with names starting with the same letter and not all having the custom role created above
- try out i.e. the autocomplete - it will list all users starting with given letter, not only those having the role configured in the selection settings.
Comment | File | Size | Author |
---|---|---|---|
#1 | user_selection-2242967-1-FAIL.patch | 3.2 KB | blueminds |
#1 | user_selection-2242967-1.patch | 4.18 KB | blueminds |
Comments
Comment #1
blueminds CreditAttribution: blueminds commentedFixed in attached patch, provided test coverage.
Looks like there is no test coverage for the user entity reference field, probably would make sense also to provide testcases for UserSelection as followup.
Comment #2
blueminds CreditAttribution: blueminds commentedComment #4
blueminds CreditAttribution: blueminds commentedComment #5
amateescu CreditAttribution: amateescu commentedThe fix and the test looks good to me.
Comment #6
alexpottCommitted c1b72d4 and pushed to 8.x. Thanks!