Bug #84214

Epic #85006: Reduce falsely reported broken links

Linkvalidator should not check records without write permissions

Added by Sybille Peters over 1 year ago. Updated 1 day ago.

Status:
Under Review
Priority:
Should have
Category:
Linkvalidator
Target version:
-
Start date:
2018-03-12
Due date:
% Done:

0%

TYPO3 Version:
9
PHP Version:
Tags:
Complexity:
Is Regression:
Sprint Focus:

Description

By default, all broken links in records for which the editor has read access (perms=1) are displayed. I think this should be changed to read / write (perms=3): It does not make sense for the editor to be displayed lists of broken links he can't do anything about because he does not have write permsission to the records.

Reproduce

Set permissions so a specific user does not have write access to content but can view the page in page tree. The page has one or more broken links. Check for broken links has already been performed

  1. Set permission for page: other user and same group as user (e.g. simple editor)
  2. Set permissions so group can only show page (not edit content)

  1. Open report for broken links
  2. Start to edit a broken link by clicking on pencil symbol

Error message:

Sorry, you didn't have proper permissions to perform this change.

No content edit permission for user 2 on page 104 1437679657

Solution

Must check if editor can edit the table.field:

  • for table_name = 'pages' : check if page is editable
  • for table_name not 'pages' check if content is editable

Additionally:

  • the specific field must be editable for the users, e.g. for pages.canonical_link : this must be editable by the user / group (see exclude fields)
  • BackendUserAuthentication::isRTE() : is RTE enable for the user (for RTE fields) - this is not necessary, even if RTE is disabled, editor can still edit the field
  • might also have to check if editing a translation is allowed for the user if the record is in non default language

Also might have to consider in the future:

(BackendUserAuthentication::isInWebMount() to check if page is in webmount) - only if complete list is displayed regardless of currently selected page which is currently not the case

permissions.png View (7.04 KB) Sybille Peters, 2019-09-23 15:43


Related issues

Related to TYPO3 Core - Feature #89182: Linkvalidator should only check relevant fields in table New 2019-09-16

History

#1 Updated by Sybille Peters over 1 year ago

  • Parent task set to #85006

#2 Updated by Sybille Peters 2 months ago

  • Description updated (diff)

#3 Updated by Sybille Peters about 2 months ago

#4 Updated by Sybille Peters about 2 months ago

  • Tracker changed from Feature to Bug
  • TYPO3 Version set to 9

#5 Updated by Gerrit Code Review about 2 months ago

  • Status changed from New to Under Review

Patch set 1 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/61786

#6 Updated by Gerrit Code Review about 2 months ago

Patch set 2 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/61786

#7 Updated by Gerrit Code Review about 2 months ago

Patch set 3 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/61786

#8 Updated by Gerrit Code Review about 2 months ago

Patch set 4 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/61786

#9 Updated by Gerrit Code Review about 2 months ago

Patch set 5 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/61786

#10 Updated by Gerrit Code Review about 2 months ago

Patch set 6 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/61786

#11 Updated by Gerrit Code Review about 2 months ago

Patch set 7 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/61786

#12 Updated by Gerrit Code Review about 2 months ago

Patch set 8 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/61786

#13 Updated by Gerrit Code Review about 2 months ago

Patch set 9 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/61786

#14 Updated by Gerrit Code Review about 2 months ago

Patch set 10 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/61786

#15 Updated by Gerrit Code Review about 2 months ago

Patch set 11 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/61786

#16 Updated by Gerrit Code Review about 1 month ago

Patch set 12 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/61786

#17 Updated by Gerrit Code Review about 1 month ago

Patch set 13 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/61786

#18 Updated by Gerrit Code Review 27 days ago

Patch set 14 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/61786

#19 Updated by Gerrit Code Review 13 days ago

Patch set 15 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/61786

#20 Updated by Gerrit Code Review 13 days ago

Patch set 16 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/61786

#21 Updated by Gerrit Code Review 13 days ago

Patch set 17 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/61786

#22 Updated by Sybille Peters 12 days ago

  • Related to Feature #89182: Linkvalidator should only check relevant fields in table added

#23 Updated by Sybille Peters 12 days ago

  • Description updated (diff)

#24 Updated by Gerrit Code Review 6 days ago

Patch set 18 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/61786

#25 Updated by Gerrit Code Review 4 days ago

Patch set 19 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/61786

#26 Updated by Gerrit Code Review 1 day ago

Patch set 20 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/61786

#27 Updated by Gerrit Code Review 1 day ago

Patch set 21 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/61786

Also available in: Atom PDF