xmlsitemap's hook_perm defines the permissions as

function xmlsitemap_perm() {
  return array('override node settings', 'override profile settings');
}

But in xmlsitemap_node_form_alter, xmlsitemap_node checks with this:

      '#access' => user_access('override node priority') || user_access('administer nodes'),
CommentFileSizeAuthor
#3 issue-535192.patch1.31 KBAnonymous (not verified)
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Anonymous’s picture

Version: 6.x-1.0-rc1 » 6.x-1.0-rc2

Thanks for the report. The question now is, should I leave 'override node settings' in hook_perm and change the 'override node priority' to match it; or should I change 'override node settings' to 'override node priority' and create an update to modify the permission table. The first option is easier the second option isn't that bad and it is the one I think I prefer. Dave?

EDIT: One con with the second plan is a change to translatable strings.

apaderno’s picture

Title: override node settings permission not checked properly in xmlsitemap_node_form_alter » Override node settings permission is not checked properly in xmlsitemap_node_form_alter()

I would change the "override node priority"; the other one is more generic, and it could be used even when the user is allowed to override other XML sitemap settings for the node. Even if the module would not define any new settings for the node, there could be a third-party module that extends XML sitemap node, and could use the permission already existing.

Anonymous’s picture

Status: Active » Fixed
FileSize
1.31 KB

The attached patch has been committed to CVS.

Status: Fixed » Closed (fixed)

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