Currently you need the administer site configuration permission to administer this module.

That permission is very powerful and is generally given to very few users so it is not ideal for use with this module, which is more the domain of a higher level content editor or low level site builder type role.

It is especially annoying to have to have a full site admin edit the block of content at the top of the site map.

This would also need an update script to assign the new permission to all roles that currently have the administer site configuration role.

Comments

rooby created an issue. See original summary.

pareshpatel’s picture

Assigned: Unassigned » pareshpatel
pareshpatel’s picture

Assigned: pareshpatel » Unassigned
Status: Active » Needs review
StatusFileSize
new371 bytes

Please find the attached patch for the same.

rooby’s picture

Status: Needs review » Needs work

Thanks for the patch.

+++ b/site_map.module
@@ -16,6 +16,9 @@ function site_map_permission() {
+	'administer site configuration' => array(
+      'title' => t('Site map configuration'),
+    ),
  1. You cannot call the permission 'administer site configuration' because that permission is already defined by Drupal core. It should be called 'administer site map' or similar.
  2. The title should be 'Administer site map configuration' or 'Configure site map' or similar. Something that describes the action the user will get access to.
  3. Indentation needs fixing.

In addition to that, there will need to be an update function to assign the new permission to any roles that currently have the 'administer site configuration' role to avoid breaking existing sites' permissions.

sagar ramgade’s picture

Status: Needs work » Needs review
StatusFileSize
new788 bytes

Hi,

I have added a permission called "Administer site map" which can be assigned to roles to administer site map. I think this should be done for D8 too.

Status: Needs review » Needs work

The last submitted patch, 5: sitemap-add_administration_permission-2756765-5.patch, failed testing.

The last submitted patch, 5: sitemap-add_administration_permission-2756765-5.patch, failed testing.

sagar ramgade’s picture

Status: Needs work » Needs review
StatusFileSize
new1.2 KB

It seems we need fix tests also, patch attached does that.

pareshpatel’s picture

Assigned: Unassigned » pareshpatel
Status: Needs review » Needs work

@rooby: Thanks for your feedback.

@Sagar: Thanks for your patch but it seems that you have missed the point#3 mentioned by rooby. If any roles have already assigned "Administer site configuration" permission then they do not have access of site configuration page.

pareshpatel’s picture

Assigned: pareshpatel » Unassigned
Status: Needs work » Needs review
StatusFileSize
new1.75 KB

Please find the attached updated patch. Update.php must run to set the permissions for roles having "Administer site configuration".

sagar ramgade’s picture

Status: Needs review » Needs work

@Paresh, the comment below seems to be corrected.

+
+/**
+ * Set the configuration page permission to administer user
+ */
pareshpatel’s picture

Status: Needs work » Needs review
StatusFileSize
new1.8 KB

Comment has been corrected and re rolled the patch.

renatog’s picture

Assigned: Unassigned » renatog
Status: Needs review » Reviewed & tested by the community
Issue tags: +ciandt-contrib
StatusFileSize
new17.84 KB
new10.13 KB

Hi people.

I applied the patch and works good for me.

Before:

After:

P.s. Point in #11 was fixed.

Good Work.

Regards.

  • RenatoG committed 5427c58 on 7.x-1.x authored by pareshpatel
    Issue #2756765 by pareshpatel, Sagar Ramgade, RenatoG, rooby: Add an...
renatog’s picture

Status: Reviewed & tested by the community » Fixed
StatusFileSize
new17.23 KB
new9.74 KB

Fixed.

Commited in dev branch.

Thank you very much people.

Good Work.

Regards.

Status: Fixed » Closed (fixed)

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