- Issue created by @kksandr
- last update
over 1 year ago Patch Failed to Apply - last update
over 1 year ago Patch Failed to Apply - last update
over 1 year ago 30,139 pass, 1 fail - last update
over 1 year ago 30,141 pass, 2 fail - Merge request !4739Issue #3386313: The entity link label formatter does not check URL access. β (Closed) created by Unnamed author
- last update
over 1 year ago 30,141 pass, 2 fail - last update
over 1 year ago 30,146 pass - Status changed to Needs review
over 1 year ago 3:47pm 10 September 2023 - Status changed to RTBC
over 1 year ago 2:33pm 12 September 2023 - πΊπΈUnited States smustgrave
Thank you for including test-only patch.
Only question would be the todo linking to follow up issues but will see if committers think that's an issue.
LGTM
- last update
over 1 year ago 30,148 pass - last update
over 1 year ago 30,154 pass - last update
over 1 year ago 30,161 pass - last update
over 1 year ago 30,164 pass - last update
over 1 year ago 30,168 pass - last update
over 1 year ago 30,205 pass - last update
over 1 year ago 30,205 pass - last update
about 1 year ago 30,360 pass 59:28 55:15 Running- last update
about 1 year ago 30,360 pass - last update
about 1 year ago 30,371 pass - last update
about 1 year ago 30,379 pass - last update
about 1 year ago 30,377 pass - Status changed to Needs work
about 1 year ago 5:07am 9 October 2023 - π³πΏNew Zealand quietone
@kksandr, thanks for issue and the MR!
I'm triaging RTBC issues β . I read the IS, which is missing several sections. I have restored those in case they are needed and so we have the 'remaining tasks' section. I read the one comment that gives thanks for the test only path and leaves a question for the committer team. I do not see evidence of a code review.
I applied the diff and read the comment with the @todo. The comment should be wrapped correctly and instead of referring to a file it should refer to a class, or method. That said, I then ran the test without the added user to see the failure. That was at
/var/www/html/core/lib/Drupal/Core/ParamConverter/EntityConverter.php:149
which also has a todo. And that todo refers to https://www.drupal.org/node/2934192 β which is removing the block of code where the test is failing. It seems to me the @todo should point to that issue. Unless, I am missing something. Then, when that is fixed the creation of the user can be removed. (I tried that by applying that patch and removing the creation of the user and the test passed). Also, the anonymous user should only be created in the test where it is needed, instead instead of in the setup.In testLabelFormatter, the value
build[0]['#url']
is always unset. Surely, there should be a test for when it is set.Setting to needs work for the above.
- Merge request !8447Issue #3386313 by kksandr: Fixed access check in entity label formatter β (Closed) created by Unnamed author
- Status changed to Needs review
6 months ago 3:49pm 18 June 2024 - Status changed to RTBC
6 months ago 4:15pm 8 July 2024 - πΊπΈUnited States smustgrave
Seems all the todos have been removed/addressed
https://git.drupalcode.org/issue/drupal-3386313/-/jobs/1896646 shows the current test coverage is still there
The test chunk added in https://git.drupalcode.org/project/drupal/-/merge_requests/8447/diffs?co... believe addressed the test scenario where the URL is not unset.
- Status changed to Needs work
5 months ago 4:01am 19 July 2024 The Needs Review Queue Bot β tested this issue. It no longer applies to Drupal core. Therefore, this issue status is now "Needs work".
This does not mean that the patch necessarily needs to be re-rolled or the MR rebased. Read the Issue Summary, the issue tags and the latest discussion here to determine what needs to be done.
Consult the Drupal Contributor Guide β to find step-by-step guides for working with issues.
- First commit to issue fork.
- Status changed to Needs review
4 months ago 9:13am 14 August 2024 - Status changed to RTBC
4 months ago 11:23am 14 August 2024 - πΊπΈUnited States smustgrave
Missed the additional threads after I marked RTBC but believe feedback has been addressed
- Status changed to Needs review
4 months ago 11:53am 26 August 2024 - Status changed to RTBC
4 months ago 12:28pm 26 August 2024 - π¬π§United Kingdom longwave UK
Similar to the fix in π StringFormatter always displays links to entity even if the user in context does not have access Needs work this needs a change record to explain the behaviour change to users (and tests) that might be relying on the current behaviour.
- ππΊHungary mxr576 Hungary
It may feels copy-paste... because admittedly, it is! :)
The "Label" entity reference field formatter now restricts links for inaccessible destinations β
- π¬π§United Kingdom longwave UK
Thanks, the change record reads well and the code changes look good too.
-
larowlan β
committed 85dc67bf on 11.x
Issue #3386313 by kksandr, mxr576, smustgrave, longwave, catch: The...
-
larowlan β
committed 85dc67bf on 11.x
- π¦πΊAustralia larowlan π¦πΊπ.au GMT+10
Committed to 11.x
I think it is worth back-porting this to 10.4 for API compatibility and because its a bug.
I don't think we can back port it to 10.3/11.0 because the behaviour change could be disruptive.Needs re-roll for 10.4.x
Published the change record.
Thanks
-
larowlan β
committed e6525b08 on 11.1.x
Issue #3386313 by kksandr, mxr576, smustgrave, longwave, catch: The...
-
larowlan β
committed e6525b08 on 11.1.x
- π¦πΊAustralia larowlan π¦πΊπ.au GMT+10
I backported this to 11.1.x
Setting to 10;5.x, but also needs backport for 10.4.x
- πΊπΈUnited States bkosborne New Jersey, USA
Isn't there a legit use case for still linking to pages a user does not have access to? Like if the entity being linked to is not available to anonymous users, but is available to authenticated users. We'd still want the link to that entity because we can log the user in automatically when they encounter a 403 and are logged out.
- ππΊHungary mxr576 Hungary
Yes, you may want to suggest the user to log in because afterwards they **may** get access to something, but at the same time, you may not want to disclose information about the entity behind the scenes, like the title/label could already hold such information.
So in this cases you actually would like to expose a Call To Action based on a deliberate decision and driving the user.
- πΊπΈUnited States bkosborne New Jersey, USA
So in this cases you actually would like to expose a Call To Action based on a deliberate decision and driving the user.
But I can't do that anymore with this change, right? At least, not using this field formatter.