Problem/Motivation

The Drupal\node\Plugin\Action\AssignOwnerNode action allows assigning node ownership to the anonymous user. This is due to a typo in buildConfigurationForm(): The key #selection_setttings has three t's.

Steps to reproduce

  1. Login as a user with ['administer actions', 'administer users'] permissions.
  2. Visit admin/config/system/actions.
  3. Until #3163934: Remove raw DB queries in AssignOwnerNode::buildConfigurationForm() and always use autocomplete is fixed, create over 200 users on the site.
  4. Create an 'node_assign_owner_action' action.
  5. Configure the username.
  6. Type in 'Anonymous' and see that you can select UID 0 for this.

Proposed resolution

Fix the typo + prevent Anonymous user from being used for this action (as originally intended).

Remaining tasks

  1. Decide if #3094840: Allow assigning Anonymous owner in AssignOwnerNode action is worth worrying about before fixing this.
  2. Decide if we need a CR for this change.
  3. Commit.

User interface changes

'Anonymous' will no longer be an allowed value for the autocomplete when configuring a node_assign_owner_action at admin/config/system/actions.

API changes

N/A

Data model changes

N/A

Release notes snippet

'Anonymous' will no longer be an allowed value for the autocomplete element when configuring the username for a node_assign_owner_action at admin/config/system/actions.

Follow-ups

  1. #3163934: Remove raw DB queries in AssignOwnerNode::buildConfigurationForm() and always use autocomplete
  2. #3094840: Allow assigning Anonymous owner in AssignOwnerNode action
CommentFileSizeAuthor
#52 2830504-52.patch3.53 KBjungle
#47 interdiff-44-47.txt1.3 KBjungle
#47 2830504-47-test-only.patch2.55 KBjungle
#47 2830504-47.patch3.53 KBjungle
#44 interdiff-43-44.txt1.47 KBjungle
#44 2830504-44-test-only.patch2.55 KBjungle
#44 2830504-44.patch3.53 KBjungle
#43 interdiff-40-43.txt1.37 KBjungle
#43 2830504-43.patch3.48 KBjungle
#43 2830504-43-test-only.patch2.51 KBjungle
#42 interdiff-36-40.txt2.68 KBjungle
#40 2830504-40.patch3.41 KBjungle
#40 2830504-40-test-only.patch2.43 KBjungle
#36 2830504-36.patch3.2 KBjungle
#36 2830504-36-test-only.patch2.22 KBjungle
#27 interdiff-21-27.txt1.57 KBAnonymous (not verified)
#27 2830504-27.patch2.91 KBAnonymous (not verified)
#27 2830504-27-test-only.patch2.22 KBAnonymous (not verified)
#21 interdiff-6-8.txt1.84 KBAnonymous (not verified)
#21 2929931-8.patch3.01 KBAnonymous (not verified)
#18 2830504-18.patch3.12 KBAnonymous (not verified)
#18 2830504-18-test-only.patch2.43 KBAnonymous (not verified)
#14 interdiff-2830504-7-14.txt1.04 KBmegadesk3000
#14 misspelling_of_key-2830504-14.patch3.13 KBmegadesk3000
#7 interdiff-2830504-2-7.txt1.76 KBmegadesk3000
#7 misspelling_of_key-2830504-7.patch2.58 KBmegadesk3000
#3 misspelling_of_key-2830504-2.patch706 bytesmegadesk3000
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

megadesk3000 created an issue. See original summary.

megadesk3000’s picture

Issue summary: View changes
megadesk3000’s picture

megadesk3000’s picture

Assigned: megadesk3000 » Unassigned
Status: Active » Needs review
dermario’s picture

Status: Needs review » Needs work
Issue tags: +Needs tests

This was a good finding! The fact that all test are fine after that change and obviously have been before, let me assume that this part has a lack of test coverage.

megadesk3000’s picture

Assigned: Unassigned » megadesk3000

You are absolutely right. I will write a SimpleTest for that.

megadesk3000’s picture

I added a test that will fail with the original code and succeed with the included patch.

megadesk3000’s picture

Assigned: megadesk3000 » Unassigned
Status: Needs work » Needs review
dermario’s picture

Issue tags: -Needs tests
Dinesh18’s picture

This Patch #7 Works as expected !!

dermario’s picture

Status: Needs review » Reviewed & tested by the community

I also can confirm, that the patch in #7 works as expected. In my opinion this fixes a trivial security issue as an anonymous user can be selected, even it was not intended by an administrator. The attached test adds coverage that was missing before. Together with the feedback #10 i think its ok to set this issue to RTBC.

alexpott’s picture

Status: Reviewed & tested by the community » Needs work
  1. +++ b/core/modules/node/src/Tests/NodeActionsConfigurationTest.php
    @@ -81,4 +81,39 @@ public function testAssignOwnerNodeActionConfiguration() {
    +  public function testAssignOwnerNodeActionAnonymous() {
    

    Nice to see the new test coverage being added.

  2. +++ b/core/modules/node/src/Tests/NodeActionsConfigurationTest.php
    @@ -81,4 +81,39 @@ public function testAssignOwnerNodeActionConfiguration() {
    +    // We don't want to receive the anonymous user here.
    

    We're only testing the negative case. As we're adding new test coverage of the autocomplete field I think we should at least add positive test coverage that it works too.

  3. +++ b/core/modules/node/src/Tests/NodeActionsConfigurationTest.php
    @@ -81,4 +81,39 @@ public function testAssignOwnerNodeActionConfiguration() {
    +    $expected = array();
    +    $this->assertIdentical($expected, $data);
    

    Let's just change this to:
    $this->assertIdentical([], $data);
    There's no point making someone wonder what $expected equals.

  4. Can someone check to see if an issue exists for or file a followup to convert this class to use entity query instead of directly querying the database?
megadesk3000’s picture

Assigned: Unassigned » megadesk3000

Hi alexpott

Thanks for your feedback. I will work on that tomorrow.

Jan

megadesk3000’s picture

Hi alexpott

Sorry for the late reply. I did the changes proposed by you in 2) and 3).

Jan

Version: 8.2.x-dev » 8.3.x-dev

Drupal 8.2.6 was released on February 1, 2017 and is the final full bugfix release for the Drupal 8.2.x series. Drupal 8.2.x will not receive any further development aside from critical and security fixes. Sites should prepare to update to 8.3.0 on April 5, 2017. (Drupal 8.3.0-alpha1 is available for testing.)

Bug reports should be targeted against the 8.3.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.4.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.3.x-dev » 8.4.x-dev

Drupal 8.3.6 was released on August 2, 2017 and is the final full bugfix release for the Drupal 8.3.x series. Drupal 8.3.x will not receive any further development aside from critical and security fixes. Sites should prepare to update to 8.4.0 on October 4, 2017. (Drupal 8.4.0-alpha1 is available for testing.)

Bug reports should be targeted against the 8.4.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.5.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.4.x-dev » 8.5.x-dev

Drupal 8.4.4 was released on January 3, 2018 and is the final full bugfix release for the Drupal 8.4.x series. Drupal 8.4.x will not receive any further development aside from critical and security fixes. Sites should prepare to update to 8.5.0 on March 7, 2018. (Drupal 8.5.0-alpha1 is available for testing.)

Bug reports should be targeted against the 8.5.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.6.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Anonymous’s picture

Status: Needs work » Needs review
FileSize
2.43 KB
3.12 KB

Rerolled #14 patch + slightly simplified test.

The last submitted patch, 18: 2830504-18-test-only.patch, failed testing. View results

amateescu’s picture

+++ b/core/modules/node/tests/src/Functional/NodeActionsConfigurationTest.php
@@ -80,4 +82,37 @@ public function testAssignOwnerNodeActionConfiguration() {
+   * Tests if autocomplete field does not show anonymous user.

I don't think this new test adds any value, it is basically re-testing something that is already covered by \Drupal\Tests\system\Functional\Entity\EntityReferenceSelection\EntityReferenceSelectionAccessTest::testUserHandler().

The only thing that it's preventing is not allowing future patches to reintroduce the typo in Drupal\node\Plugin\Action\AssignOwnerNode, but chances of that happening are pretty close to 0 :)

Anonymous’s picture

#18: Fixed a potential flaw leading to a random error (among the 200 names there may be a combination of 'tor' that will return more than 1 user when searching for this name). + A little more simplification.

#20: @amateescu, if we can not correct a typo without giving a test, then what should we do?)

In fact, the test does not attempt to compete with other tests. It only checks the correctness of these lines:

public function buildConfigurationForm(array $form, FormStateInterface $form_state) {
    if (intval($count) < 200) {
      ...
    }
    else {
      $form['owner_uid'] = [
        ... 
        '#selection_setttings' => [
          'include_anonymous' => FALSE,
        ],
        ...
      ];
    }
  ...
  }

For this purpose, he makes sure that the search is working (finds not anonymous users), and the selection_settings is correctly configured (does not find anonymous users), when more than 200 users.

amateescu’s picture

he makes sure that the search is working (finds not anonymous users)

This is the part that is already tested in \Drupal\Tests\system\Functional\Entity\EntityReferenceSelection\EntityReferenceSelectionAccessTest::testUserHandler() :)

Anonymous’s picture

Okay) What if we leave only

+++ b/core/modules/node/tests/src/Functional/NodeActionsConfigurationTest.php
@@ -80,4 +82,34 @@ public function testAssignOwnerNodeActionConfiguration() {
+    $this->drupalPostForm('admin/config/system/actions', ['action' => 'node_assign_owner_action'], 'Create');
...
+    $data = Json::decode($this->drupalGet($autocomplete_url, ['query' => ['q' => 'Anonymous', '_format' => 'json']]));
+    $this->assertEmpty($data, 'Anonymous users are not included in the results.');

Can we claim that the search filters anonymous? Yes, if in this test the filter is works at all. Otherwise, it can always return a empty data, and then in reality we can not guarantee anything.

For this reason, we need to be sure that the filter works in this test, and not in the other. In other words, we check the search with non-empty data not for checking the filter, but for self-testing the test ;)

Status: Needs review » Needs work

The last submitted patch, 21: 2929931-8.patch, failed testing. View results

Anonymous’s picture

Status: Needs work » Needs review
Anonymous’s picture

To actually test the autocomplete widget, we need a JTB test. Now it's just a test of a specific parameter, in order to correct the typo in key.

+++ b/core/modules/node/tests/src/Functional/NodeActionsConfigurationTest.php
@@ -80,4 +82,34 @@ public function testAssignOwnerNodeActionConfiguration() {
+    $data = Json::decode($this->drupalGet($autocomplete_url, ['query' => ['q' => 'Tor', '_format' => 'json']]));
+    $this->assertNotEmpty($data, 'Usual users are included in the results.');

If we do not need an additional self test, then I will delete it without any problems, of course :)

Anonymous’s picture

Removed extra testing in accordance with #22.
Extended the comment on the creation of 200 users.

Quickfix - because it is a just nit typo. We can fix it with extra test coverage (#21), or with minimal test coverage (#27), or without test coverage at all.

The last submitted patch, 27: 2830504-27-test-only.patch, failed testing. View results

Anonymous’s picture

Version: 8.5.x-dev » 8.6.x-dev

Version: 8.6.x-dev » 8.7.x-dev

Drupal 8.6.0-alpha1 will be released the week of July 16, 2018, which means new developments and disruptive changes should now be targeted against the 8.7.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.7.x-dev » 8.8.x-dev

Drupal 8.7.0-alpha1 will be released the week of March 11, 2019, which means new developments and disruptive changes should now be targeted against the 8.8.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

idebr’s picture

Version: 8.8.x-dev » 8.9.x-dev

Drupal 8.8.0-alpha1 will be released the week of October 14th, 2019, which means new developments and disruptive changes should now be targeted against the 8.9.x-dev branch. (Any changes to 8.9.x will also be committed to 9.0.x in preparation for Drupal 9’s release, but some changes like significant feature additions will be deferred to 9.1.x.). For more information see the Drupal 8 and 9 minor version schedule and the Allowed changes during the Drupal 8 and 9 release cycles.

matthieuscarset’s picture

Closed https://www.drupal.org/project/drupal/issues/3094840#comment-13357098 as a duplicate issue.

By the way, I think it is a little bit frightening to see that a simple typo (e.g. just an extra "t" in selection_settings) has not been solved since the issue was opened 3 years ago.

Could we consider fixing the typo and maybe open a another issue for the missing tests explained in #26 and #27 ?

Version: 8.9.x-dev » 9.1.x-dev

Drupal 8.9.0-beta1 was released on March 20, 2020. 8.9.x is the final, long-term support (LTS) minor release of Drupal 8, which means new developments and disruptive changes should now be targeted against the 9.1.x-dev branch. For more information see the Drupal 8 and 9 minor version schedule and the Allowed changes during the Drupal 8 and 9 release cycles.

jungle’s picture

Rerolled the patch based on #27, meanwhile, removed the typo from core/misc/cspell/dictionary.txt. No interdiff/raw-interdiff as the patch size is very small.

jungle’s picture

Issue summary: View changes

Applying IS template

The last submitted patch, 36: 2830504-36-test-only.patch, failed testing. View results

dww’s picture

Basically looks great, thanks! A bunch of mostly trivial nits and 1 point of real substance at the end:

  1. +++ b/core/modules/node/tests/src/Functional/NodeActionsConfigurationTest.php
    @@ -85,4 +87,32 @@ public function testAssignOwnerNodeActionConfiguration() {
    +   * Tests if autocomplete field does not show anonymous user.
    

    "Tests that the autocomplete field does not show the anonymous user."

  2. +++ b/core/modules/node/tests/src/Functional/NodeActionsConfigurationTest.php
    @@ -85,4 +87,32 @@ public function testAssignOwnerNodeActionConfiguration() {
    +    // Create 200 Users, to force the action's configuration page to show up
    +    // an autocomplete field instead of a select field.
    

    "Create 200 users to force the action's configuration page to use an autocomplete field instead of a select field."

  3. +++ b/core/modules/node/tests/src/Functional/NodeActionsConfigurationTest.php
    @@ -85,4 +87,32 @@ public function testAssignOwnerNodeActionConfiguration() {
    +    // See \Drupal\node\Plugin\Action\AssignOwnerNode::buildConfigurationForm().
    

    s/See/@see/ ? Although then it'd be 81 chars wide. :( Maybe just leave it like this. ;)

  4. +++ b/core/modules/node/tests/src/Functional/NodeActionsConfigurationTest.php
    @@ -85,4 +87,32 @@ public function testAssignOwnerNodeActionConfiguration() {
    +    for ($i = 0; $i < 200; ++$i) {
    

    This works, but we don't depend on incrementing $i before evaluating it here. Core basically always uses $i++ so we should stick with that for consistency (unless we actually needed the ++$i behavior for something).

  5. +++ b/core/modules/node/tests/src/Functional/NodeActionsConfigurationTest.php
    @@ -85,4 +87,32 @@ public function testAssignOwnerNodeActionConfiguration() {
    +    // Ensure that anonymous user exists.
    

    s/that/that the/

  6. +++ b/core/modules/node/tests/src/Functional/NodeActionsConfigurationTest.php
    @@ -85,4 +87,32 @@ public function testAssignOwnerNodeActionConfiguration() {
    +    // not be able to reference the anonymous user anyway.
    

    s/ anyway//

  7. +++ b/core/modules/node/tests/src/Functional/NodeActionsConfigurationTest.php
    @@ -85,4 +87,32 @@ public function testAssignOwnerNodeActionConfiguration() {
    +    // Get the autocomplete url of the owner_uid textfield.
    

    s/url/URL/

  8. +++ b/core/modules/node/tests/src/Functional/NodeActionsConfigurationTest.php
    @@ -85,4 +87,32 @@ public function testAssignOwnerNodeActionConfiguration() {
    +    $autocomplete_field = $this->xpath('//input[@name="owner_uid"]')[0];
    

    Would this be cleaner with $this->getSession()->getPage()->findField('owner_uid') ?

    I think the xpath() is clear enough, but some folks prefer to use the specific helpers instead of xpath(). /shrug

  9. +++ b/core/modules/node/tests/src/Functional/NodeActionsConfigurationTest.php
    @@ -85,4 +87,32 @@ public function testAssignOwnerNodeActionConfiguration() {
    +    $this->assertEmpty($data, 'Anonymous users are not included in the results.');
    

    Since it's a new assertion, let's not add the message argument. We're trying to get rid of those. ;)

  10. #12.2 is not addressed. The test should also make sure autocomplete works like it's supposed to. ;)

Thanks!
-Derek

jungle’s picture

Status: Needs work » Needs review
FileSize
2.43 KB
3.41 KB

@dww, many thanks for reviewing!

Addressing #39 and #12.2 by adding the following lines.

+++ b/core/modules/node/tests/src/Functional/NodeActionsConfigurationTest.php
@@ -85,4 +87,38 @@ public function testAssignOwnerNodeActionConfiguration() {
+    // Make sure that autocomplete works.
+    $user = $this->drupalCreateUser();
+    $data = Json::decode($this->drupalGet($autocomplete_url, ['query' => ['q' => $user->getAccountName(), '_format' => 'json']]));
+    $this->assertNotEmpty($data);
s/See/@see/ ? Although then it'd be 81 chars wide. :( Maybe just leave it like this. ;)

Re #39.3, instead of s/See/@see/, appended/moved See to the end of the previous line.

dww’s picture

Status: Needs review » Needs work

Thanks, that was fast!

Interdiff would have been helpful...

Almost there:

  1. +++ b/core/modules/node/tests/src/Functional/NodeActionsConfigurationTest.php
    @@ -85,4 +87,38 @@ public function testAssignOwnerNodeActionConfiguration() {
    +   * Tests that the autocomplete field does not show the anonymous user.
    ...
    +  public function testAssignOwnerNodeActionAnonymous() {
    ...
    +    // Make sure that autocomplete works.
    

    Whoops, the function name no longer matches the scope of what's tested.

    Maybe:

    * Tests the autocomplete field when configuring the AssignOwnerNode action.
    testAssignOwnerNodeActionAutocomplete()

    ?

  2. +++ b/core/modules/node/tests/src/Functional/NodeActionsConfigurationTest.php
    @@ -85,4 +87,38 @@ public function testAssignOwnerNodeActionConfiguration() {
    +    $data = Json::decode($this->drupalGet($autocomplete_url, ['query' => ['q' => 'Anonymous', '_format' => 'json']]));
    

    Now that we have the assertions above, this could use:

    // Make sure the autocomplete does not show the anonymous user.

Thanks!
-Derek

jungle’s picture

FileSize
2.68 KB

I have made an interdiff, but forgot to attach, attaching first. sorry.

jungle’s picture

Status: Needs work » Needs review
FileSize
2.51 KB
3.48 KB
1.37 KB

Addressing #41

jungle’s picture

+++ b/core/modules/node/tests/src/Functional/NodeActionsConfigurationTest.php
@@ -85,4 +87,39 @@ public function testAssignOwnerNodeActionConfiguration() {
+    $data = Json::decode($this->drupalGet($autocomplete_url, ['query' => ['q' => 'Anonymous', '_format' => 'json']]));

Instead of using hardcoded account name "Anonymous", I'd like passing it the account name got from the system.

// $anonymous = User::getAnonymousUser();
'q' => $anonymous->getAccountName()
Berdir’s picture

  1. +++ b/core/modules/node/tests/src/Functional/NodeActionsConfigurationTest.php
    @@ -85,4 +87,40 @@ public function testAssignOwnerNodeActionConfiguration() {
    +   */
    +  public function testAssignOwnerNodeActionAutocomplete() {
    +    // Create 200 users to force the action's configuration page to use an
    +    // autocomplete field instead of a select field. See
    +    // \Drupal\node\Plugin\Action\AssignOwnerNode::buildConfigurationForm().
    +    for ($i = 0; $i < 200; $i++) {
    +      $this->drupalCreateUser();
    +    }
    +
    

    ouch, this is weird. The code is also super ugly and does raw database queries against the user table. I'm seriously wondering if we should create a follow-up and kill that conditionial and just always an autocomplete? Other places don't do this either, the node edit form is always an autocomplete, so why bother with this?

    Then in that follow-up we could just remove this part.

  2. +++ b/core/modules/node/tests/src/Functional/NodeActionsConfigurationTest.php
    @@ -85,4 +87,40 @@ public function testAssignOwnerNodeActionConfiguration() {
    +    $this->assertNotNull($anonymous);
    +    // Make sure the autocomplete does not show the anonymous user.
    +    $data = Json::decode($this->drupalGet($autocomplete_url, ['query' => ['q' => $anonymous->getAccountName(), '_format' => 'json']]));
    +    $this->assertEmpty($data);
    

    anonymous doesn't have an account name, it only has a display name.

    So this is searching for ''.

dww’s picture

Re: #45.1 (see also #12.4): Yup, that's a good idea.

#3163934: Remove raw DB queries in AssignOwnerNode::buildConfigurationForm() and always use autocomplete

Re: #45.2: looks like we should go back to patch #43 then.

NeedsFollowup ;)

Cheers,
-Derek

jungle’s picture

anonymous doesn't have an account name, it only has a display name.

@Berdir, you're right, thanks! calling getDisplayName() instead.

dww’s picture

Note: unsurprisingly, some folks prefer the current behavior. ;) See #3094840: Allow assigning Anonymous owner in AssignOwnerNode action I don't think we should do anything about that here, but I wanted to raise visibility for that.

Status: Needs review » Needs work

The last submitted patch, 47: 2830504-47-test-only.patch, failed testing. View results

jungle’s picture

Status: Needs work » Needs review

Expected fail

dww’s picture

Status: Needs review » Needs work

You need to upload the test-only first, then the full patch, or the bot gets confused. You'll probably want to re-upload #47 so the last patch in here is the real / passing one.

Test failure is as expected:

1) Drupal\Tests\node\Functional\NodeActionsConfigurationTest::testAssignOwnerNodeActionAutocomplete
Failed asserting that an array is empty.

/var/www/html/vendor/phpunit/phpunit/src/Framework/Constraint/Constraint.php:118
/var/www/html/vendor/phpunit/phpunit/src/Framework/Constraint/Constraint.php:54
/var/www/html/vendor/phpunit/phpunit/src/Framework/Assert.php:2887
/var/www/html/vendor/phpunit/phpunit/src/Framework/Assert.php:827
/var/www/html/core/modules/node/tests/src/Functional/NodeActionsConfigurationTest.php:122

No CS violations.

Other than the follow-ups, I have nothing else to complain about. ;)

Once the latest patch is the keeper, this is RTBC.

Thanks!
-Derek

jungle’s picture

Status: Needs work » Reviewed & tested by the community
FileSize
3.53 KB

Re-uploading the patch in #47, thanks again, @dww!

dww’s picture

Yup, that's the RTBC patch we need, +1.

Thanks!
-Derek

dww’s picture

Title: Misspelling of key #selection_settings » AssignOwnerNode allows assigning to anonymous users due to misspelling of key #selection_settings

Giving this a more specific name for a more useful commit message.

quietone’s picture

Assigned: megadesk3000 » Unassigned

Un-assigning megadesk3000 since they haven't worked on this since 2017.

dww’s picture

Issue summary: View changes

Fixing the summary. Not sure we need a release note snippet for this, but adding one.

dww’s picture

Issue summary: View changes

Actually, set these as remaining tasks:

  1. Decide if #3094840: Allow assigning Anonymous owner in AssignOwnerNode action is worth worrying about before fixing this.
  2. Decide if we need a CR for this change.
  3. Commit.

I think only a committer can really decide those, so leaving RTBC.

Cheers,
-Derek

dww’s picture

Issue summary: View changes

Also adding a Follow-ups section.

alexpott’s picture

Status: Reviewed & tested by the community » Fixed

I've stared at this one a bit and I wonder if we should "do" #3094840: Allow assigning Anonymous owner in AssignOwnerNode action and forget about the original intention. Like that is how it is working already today. We allow nodes to be assigned to anonymous users as part of the user cancel process already.... ah I have answer for why not.

This is only the case on sites with more that 200 users. On sites with less you can't assign to the anonymous user because we do a select and dropdown list instead where we have

SELECT uid, name FROM {users_field_data} WHERE uid > 0 

Also given that I don;t think we need a CR for this change. We've got all the follow-ups to address whether we want keep this behaviour and to move away from directly querying tables.

Committed c3152e5 and pushed to 9.1.x. Thanks!

Given this doesn't apply to 9.0.x without extra work and maybe someone will disagree about the lack of CR or the direction going to commit to 9.1.x only for now and see what, if anything, happens.

  • alexpott committed c3152e5 on 9.1.x
    Issue #2830504 by jungle, megadesk3000, dww, dermario, amateescu,...
Berdir’s picture

Thought about that too, as there's also #3163934: Remove raw DB queries in AssignOwnerNode::buildConfigurationForm() and always use autocomplete, which removes those queries completely and maybe then we can include the anonymous part there? Assumig we can agree on that, but I think the argument is the same as the one I made for removing the select-mode. It's the same on the node edit form, it also allows to select anonymous, so why should this be different?

Status: Fixed » Closed (fixed)

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