Editing Preferences by Group

Permalink 1 user found helpful
On one of my sites editors who need to see and edit pages that are not yet in the site navigation, since they aren't full admins, they can't view the sitemap in the dashboard (even after enabling view sitemap rights) this is fine, but I still need an easy way, while they are editing to view the sitemap.

I could put a link somewhere on the theme that only shows to members of the group, but to me a more elegant solution (for the users) would be to use the "Editing Preferences" options in "Sitewide Settings", then the sitemap would be accessible from the edit bar and be very smooth.

I can manually write the lines to the config table in the database to turn this on for each user in the group, but is there an easier way? Can these options be enabled for a group or even for all users, as other permissions can handle the display of the edit bar and the buttons on it?

Thank you in advance.

LordByron
 
Brainakazariua replied on at Permalink Reply
Brainakazariua
Where did you enable their sitemap rights? Did you give them access by going to dashboard -> sitemap -> access or did you try it by clicking on "show system pages" and assigning the right on the sitemap through that?

Both the sitemap and filemanager have their own access tab which is used to grant or deny access.

I suggest you check the access tab and see if the user/group has access rights enabled there.
LordByron replied on at Permalink Reply
LordByron
Yes, I did so on the access page. But since they aren't admins they don't even have a dashboard on which they can view the sitemap page.

If I add a "UI_SITEMAP, <date>, 1, <uID>, 0" line to the config table of the database everything works great, the user gets a sitemap icon on the edit bar and can access the sitemap from there, but this will quickly become cumbersome as users are added in and out of the group, and I can't imagine having 30 some extra lines in the config table is the best thing for site performance.
LordByron replied on at Permalink Reply
LordByron
If there isn't a way to do this via any sort of settings, I could edit the code rendering the edit bar to skip the check to the config table, so it would render the filemanager and sitemap icons and links for all users that have permissions to view them.

So, next question is: where is the code that renders the edit bar? ^_^
Brainakazariua replied on at Permalink Reply
Brainakazariua
Why not make a group an give that group dashboard rights so they can access the sitemap?

Or you can just make those pages only visible to the logged in users but that would require the permissions to be editted later so visitors can see those pages too.
LordByron replied on at Permalink Best Answer Reply
LordByron
Edited /concrete/tools/page_controls_menu_js.php

Line 87

From:
if ($sh->canRead() && $u->config('UI_SITEMAP')) { ?>


To:
if ($sh->canRead()) { ?>



Line 92

From:
if ($fp->canSearchFiles() && $u->config('UI_FILEMANAGER')) { ?>


To:
if ($fp->canSearchFiles()) { ?>



And lines 174 - 176

From:
<?php  if ($u->config('UI_BREADCRUMB')) {  ?>
   ccm_setupBreadcrumb();
<?php  } ?>


To:
ccm_setupBreadcrumb();


And saved as /tools/page_controls_menu_js.php

This turns on breadcrumbs for all editors and the sitemap and filemanager buttons for all editors who have permissions to use them.
Brainakazariua replied on at Permalink Reply
Brainakazariua
Just some advice: Never edit files in the /concrete folder. Always copy these to the root first.

in your case: /concrete/tools/page_controls_menu_js.php should be copied to /tools/page_controls_menu_js.php

if you don't copy them out of the /concrete folder they go lost when you update the core.
LordByron replied on at Permalink Reply
LordByron
Yeah, that's exactly what I said I did. :) (Second to last line of my post.)