
See description.
This issue created for D8.
Copy/paste from D7 issue:
The following patch allows to check if the currently logged user can access a path before outputting it (from a field). This allows to add custom "Edit" or "Delete" links in tables without having to use php.
Comment | File | Size | Author |
---|---|---|---|
#15 | Screenshot 2020-06-23 at 5.56.25 PM.png | 690.08 KB | kunalgautam |
#8 | views_output_link_url_access-3028906-8.patch | 1.75 KB | kunalgautam |
#2 | drupal-views_output_field_as_link_access_check_option-3028906-2.patch | 1.63 KB | m.lebedev |
Comments
Comment #2
m.lebedev CreditAttribution: m.lebedev commentedThere is returning $text in the patch because it is default behavior if url is incorrect. It will not be useful for all cases; so I think need adding additional option "Hide if no access".
Comment #3
m.lebedev CreditAttribution: m.lebedev commentedComment #4
joachim CreditAttribution: joachim commentedThis needs more UI text. What will happen if I select this option and the user has no access -- is the field shown as just text without a link, or is it completely hidden?
Comment #7
kunalgautam CreditAttribution: kunalgautam at Material commentedComment #8
kunalgautam CreditAttribution: kunalgautam at Material commentedComment #9
kunalgautam CreditAttribution: kunalgautam at Material commentedComment #10
ankitsingh0188Patch applied and looks good to me. Tests cases failed, updated the ticket tag accordingly.
Comment #11
ankitsingh0188Comment #13
akalam CreditAttribution: akalam at Metadrop commentedTested on 8.9 works fine.
Comment #14
kunalgautam CreditAttribution: kunalgautam at Material commentedComment #15
kunalgautam CreditAttribution: kunalgautam at Material commentedPatch #8 is applied successfully for Drupal 8.9.1 and working fine. Need to update Test cases.
Comment #16
kunalgautam CreditAttribution: kunalgautam at Material commentedComment #18
lendudeThis is a feature request in D7 and seems like a feature request for D8 also.
Since we are adding a new setting, we would also need an upgrade path for this.