for example everytime my editor goes in a node that has broken links he see in the message box the report about broken links but the role editor does not have ANY of the given permissions specific for linkchecker module

Link check of http://www. domain .com/testpage failed once (status code: 301).

perhaps a new permission should be set to allow a role to see reports on node edit

Files: 
CommentFileSizeAuthor
#11 linkchecker-hide-messages-1886890-11.patch11.04 KBcboyden
PASSED: [[SimpleTest]]: [MySQL] 209 pass(es).
[ View ]
#7 linkchecker-hide-messages-1886890-7.patch3.4 KBcboyden
PASSED: [[SimpleTest]]: [MySQL] 159 pass(es).
[ View ]
#4 linkchecker-hide-messages-1886890-4.patch2.94 KBcboyden
FAILED: [[SimpleTest]]: [MySQL] 155 pass(es), 4 fail(s), and 0 exception(s).
[ View ]

Comments

Status:Active» Postponed (maintainer needs more info)

If someone has permission to edit a node / field, he see the message on node edit form. What's wrong with this?

I would just like more granular report accessing the checker links
since in my use case the person who corrects the content
does not know enough to actually correct the links

there is the seperate site administrator that would try to resolve the broken links issues

Category:bug» feature
Status:Postponed (maintainer needs more info)» Active

if that is not good enough reason please close issue

Status:Active» Needs review
StatusFileSize
new2.94 KB
FAILED: [[SimpleTest]]: [MySQL] 155 pass(es), 4 fail(s), and 0 exception(s).
[ View ]

Several of my site admins have also asked for this feature. Here's a patch I'm testing on these installations now - it adds a permission to see broken link messages in context, then checks for that permission before setting messages on the node, comment, and block edit forms.

Status:Needs review» Needs work

The last submitted patch, linkchecker-hide-messages-1886890-4.patch, failed testing.

The patch is failing because it hides the broken link messages and those tests check for that message text to appear. I will try patching the test to create and load a user with the new permission first.

Status:Needs work» Needs review
StatusFileSize
new3.4 KB
PASSED: [[SimpleTest]]: [MySQL] 159 pass(es).
[ View ]

This patch includes a change to the LinkCheckerInterfaceTest->setUp() function that adds the 'see contextual messages' permission for the test user.

Status:Needs review» Needs work

The last submitted patch, linkchecker-hide-messages-1886890-7.patch, failed testing.

Status:Needs work» Needs review

Status:Needs review» Needs work

This patch looks good to me, but can you add an additional test to verify that the permission grant/revoke are both checked, please? By adding this permission in these late state we remove the message for everyone who has the module installed. We should add an upgrade hook to add this permission to all roles. This should also happen on hook_install.

Status:Needs work» Needs review
StatusFileSize
new11.04 KB
PASSED: [[SimpleTest]]: [MySQL] 209 pass(es).
[ View ]

I added install and update hooks - they grant the permission to all roles except anonymous. Also added a test, based on the existing interface test, that revokes the permission and checks that the messages are not showing on the edit forms.

Status:Needs review» Needs work

The new update hook throws an error if the module has been installed but is disabled when it runs.

The reason should be that you run functions that are located inside user.module.

These are not available when running .install files. You need to load the user module file before using these functions.

e.g. drupal_load('module', 'user');