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.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

blueminds’s picture

Status: Active » Needs work
FileSize
4.18 KB
3.2 KB

Fixed 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.

blueminds’s picture

Status: Needs work » Needs review

Status: Needs review » Needs work

The last submitted patch, 1: user_selection-2242967-1-FAIL.patch, failed testing.

blueminds’s picture

Status: Needs work » Needs review
amateescu’s picture

Status: Needs review » Reviewed & tested by the community

The fix and the test looks good to me.

alexpott’s picture

Status: Reviewed & tested by the community » Fixed

Committed c1b72d4 and pushed to 8.x. Thanks!

  • Commit c1b72d4 on 8.x by alexpott:
    Issue #2242967 by blueminds: User entity reference filter configuration...

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.