The /admin/settings/site-information and admin/build/themes pages should have separate permissions. At the moment access to these pages is controlled by "administer site configuration", which also controls access to things like modules and performance/cache settings.

In the case where a site is set-up for those who are not tech-savvy, they often need to be able to set the site info (site name, site email, slogan, etc) and site theme, but not be able to break the site by playing with module or performance/cache settings.

Comments

darius123-1’s picture

This is something that I could use as well, even a module that broke these things apart for permissions would help a lot. As it is now, when I give a client permission to change the 'site info' they are also granted permission to blocks, modules, ect.

asak’s picture

This is a very good idea.
A very very good idea.

asak’s picture

karschsp’s picture

Issue tags: +Novice

Tagging for the novice queue.

bradfordcp’s picture

StatusFileSize
new4.31 KB

I think this is what the issue is looking for...

bradfordcp’s picture

Status: Active » Needs review
StatusFileSize
new4.31 KB

Sorry for forgetting the status...

Status: Needs review » Needs work

The last submitted patch failed testing.

afreeman’s picture

Assigned: Unassigned » afreeman

This is a fantastic idea. Sadly over my head at the moment.

afreeman’s picture

Assigned: afreeman » Unassigned
webchick’s picture

Hey, afreeman. What about this is over your head? Maybe we can help. :)

afreeman’s picture

Assigned: Unassigned » afreeman

I can has help? I'm having an interesting time figuring out how hook_perm, hook_menu, and system_admin_menu_block_access() interrelate. The new perm array thing seems fairly intuitive. Likewise access arguments aren't anything new, I've worked with them in D6. However if I (for example) add an array item to hook_perm() for 'administer site content' and change the access callback for $items['admin/content'] to array('admin/content','administer site content') the content menu doesn't display. What am I missing?

afreeman’s picture

Nevermind, I think I see what I was doing wrong.

afreeman’s picture

Status: Needs work » Needs review
StatusFileSize
new2.25 KB

Maybe yes?

Status: Needs review » Needs work

The last submitted patch failed testing.

afreeman’s picture

Status: Needs work » Needs review
StatusFileSize
new2.68 KB

Err.

Status: Needs review » Needs work

The last submitted patch failed testing.

JuliaKM’s picture

Status: Needs work » Needs review
StatusFileSize
new5.74 KB

@afreeman: I was looking at your patch and think that I figured out why it kept failing testing. It seems to be because the tests needed to be updated to account for the new permission to "administer site theme." Here's a new version.

afreeman’s picture

StatusFileSize
new5.74 KB

Awesome! Thanks Julia! Let's see if this dog hunts.

amc’s picture

Issue tags: +permissions

tagging

dropcube’s picture

Status: Needs review » Needs work

The permission title/name should be "Administer themes", in plural, instead of "Administer theme". See, for example, other permissions in system.module: "Administer files", "Administer actions", etc...

tstoeckler’s picture

Status: Needs work » Needs review
StatusFileSize
new5.87 KB

Rerolled for #20.
Also changed the description of the permission to.
"Choose the site theme and manage theme settings"
instead of just referring to the theme settings.

naught101’s picture

Status: Needs review » Needs work

Subscribing.

Part of the original bug report is separating the "site info" from the "site configuration" (performance, site maintenance, file system, error reporting, etc..). This isn't included in the patch. It's probably more important from our point of view, as users are more likely to want to change the homepage/footer/mission than they are to change the theme.

psicomante’s picture

needs reroll :S

JuliaKM’s picture

Status: Needs work » Needs review
StatusFileSize
new7.37 KB

Here's a re-rolled version that also breaks out site information from site configuration. Those with "Administer site information" can access "admin/settings/site-information."

Status: Needs review » Needs work

The last submitted patch failed testing.

JuliaKM’s picture

Status: Needs work » Needs review
StatusFileSize
new7.75 KB

Here's a re-rolled patch to account for the 404 functionality test. I wasn't sure whether to have the test user have only "administer site information" access or whether they should have "administer site configuration" access as well. Both are included now.

Status: Needs review » Needs work

The last submitted patch failed testing.

JuliaKM’s picture

StatusFileSize
new7.67 KB

Here's a re-rolled patch.

JuliaKM’s picture

Status: Needs work » Needs review
JuliaKM’s picture

StatusFileSize
new7.67 KB

Not sure why the bot didn't test the patch. Here it is again.

JuliaKM’s picture

StatusFileSize
new7.67 KB

Here it is once again. Thanks Bojhan for the tip about renaming to .patch in IRC.

shawn dearmond’s picture

Status: Needs review » Reviewed & tested by the community

Patch performs as advertised.

A note to others who review this patch, be sure to clear caches after installing the patch. The menu system needs to be rebuilt in order for the changes to go into effect.

dries’s picture

Just wondering but with the new IA, should this permission be called 'administer site appearance' instead?

shawn dearmond’s picture

StatusFileSize
new7.71 KB

Good point. Here's an updated patch.

Shawn

shawn dearmond’s picture

Status: Reviewed & tested by the community » Needs review

bot?

shawn dearmond’s picture

StatusFileSize
new7.71 KB

ICK! I used uppercase letters in the permissions string. Bad Shawn!

Let's do this again.

JuliaKM’s picture

Status: Needs review » Reviewed & tested by the community

The #36 patch applies cleanly and performs as expected. It also incorporates the IA change to use "administer site appearance" instead of "administer site themes" from #33.

webchick’s picture

Status: Reviewed & tested by the community » Needs work

Not quite. We need an upgrade path. http://api.drupal.org/api/function/system_update_7011/7 could be used as a general guide I think.

JuliaKM’s picture

Status: Needs work » Needs review
StatusFileSize
new8.93 KB

Wow. This is one tricky novice issue. :) Here's a new patch with my attempt at a system_update function. Please review carefully.

Status: Needs review » Needs work

The last submitted patch failed testing.

JuliaKM’s picture

The 3 fails are caused by the following tests in system.install:

    $this->assertText(t('The configuration options have been saved.'), t('Modules status has been updated.'));

    // Check that hook_modules_installed and hook_modules_enabled hooks were invoked and check tables.
    $this->assertText(t('hook_modules_installed fired for aggregator'), t('hook_modules_installed fired.'));
    $this->assertText(t('hook_modules_enabled fired for aggregator'), t('hook_modules_enabled fired.'));

What's interesting is that these fails appear to be independent of what I just added to system_update_7036.

I re-ran the tests locally and found that the 3 errors occur independent of my patch and are all connected to the Aggregator module. Advice?

webchick’s picture

Status: Needs work » Needs review

The testing bot was possessed earlier today: http://testing.drupal.org/node/49

Marking back to needs review.

Status: Needs review » Needs work

The last submitted patch failed testing.

JuliaKM’s picture

Status: Needs work » Needs review
StatusFileSize
new8.94 KB

Here we go again. Re-rolled because previous version of the patch could no longer apply.

Status: Needs review » Needs work

The last submitted patch failed testing.

JuliaKM’s picture

StatusFileSize
new8.62 KB

Here's a new re-rolled version. Keeping my fingers crossed that the end is in sight.

Julia

JuliaKM’s picture

Status: Needs work » Needs review

Please testing bot. Please find me in the next hour so that someone at our Triangle Drupal Hack Night can help.

kwinters’s picture

Assigned: afreeman » kwinters
Status: Needs review » Needs work

There are some kinks to work out yet. Some of these belong on another issue, I'll sort that out in the morning and roll a new patch with some improvements.

* Permission 'Administer site configuration' is labeled 'Configure module settings' which is inaccurate. Not sure which is right yet.
* Warning: call_user_func_array(): First argument is expected to be a valid callback, 'admin_menu_flush_cache' was given in menu_execute_active_handler() (line 418 of /Applications/MAMP/d7/includes/menu.inc)
* The ability to access the page if you know the URL doesn't seem to be protected correctly
* The permission set needed to discover the URL is too heavy
* Site Information is under Reports/Site Configuration rather than the main config tab.

kwinters’s picture

Status: Needs work » Needs review
StatusFileSize
new8.43 KB

This patch now does what it set out to do (as long as testing passes). It can probably wait until after the lock to be committed, since it's not much of an API change, etc.

The most recent patch didn't take #292253: Remove the per-user themes selection from core into account, now merges correctly.

My 'administer site configuration' grep returned 85 results, so it's not accurate to describe it as t('Configure module settings.'). Change to t('Configure site-wide settings for modules and view system configuration warnings.') which is similar to the current HEAD text.

Menu item admin/settings/site-information wasn't using administer site information in this latest version, may have been lost in a merge.

Function system_update_7037 was only adding administer site appearance, needed to also add administer site information to users that have administer site configuration (since it was forked from that permission).

There is still a ton of things wrong with the menu / permission process, but I'm going to break them out into separate issues since it doesn't have direct bearing on this one.

Status: Needs review » Needs work

The last submitted patch failed testing.

kwinters’s picture

Status: Needs work » Needs review

The errors were 'Drupal error handlers' = in simpletest itself, which doesn't seem like a result of this patch.

Retesting, and if this doesn't work then I'll let it sit a few weeks.

Status: Needs review » Needs work

The last submitted patch failed testing.

kwinters’s picture

The retest failed because of conflicts (passed previously). Just needs a re-roll against head some time after the code freeze.

naught101’s picture

@kwinters: Does that mean that this isn't going to get into 7.x?

Just wondering if I should update Site Info Lite to d7 as well as d6.

kwinters’s picture

Version: 7.x-dev » 8.x-dev
Assigned: kwinters » Unassigned

The freeze for that was some time in the fall, so it will have to wait for D8.

FYI, you probably don't need to add a separate form in your module in D6 / D7. See the approach in my last patch. With a hook_menu override and adding the new perm, I think you can accomplish the same thing.

naught101’s picture

Ok. I upgraded the Site Info Lite module to d7 and d6.

@kwinters: that's true, but I kind of like having them separate - so admins and editors have a separate view. I don't think many people use the module yet, but if they do, we're happy to accept feedback on the issue queue over there.

naught101’s picture

maybe http://drupal.org/project/config_perms should be pushed into core for drupal 8?

kwinters’s picture

Maybe in concept, but probably not using any of its code directly. The D7 admin tree is already heavily reorganized so it's hard to tell if all the concepts even still apply. Who knows what D8 will bring.

albert volkman’s picture

Status: Needs work » Needs review

In D7/D8 there's a new permission "Administer themes" that separates these permissions-

http://drupal.org/node/446666

Can we mark this as closed?

albert volkman’s picture

Actually, upon further thought, I'd really like to see the split permissions backported to D6. If there's no objections, I'll go ahead and roll a patch.

albert volkman’s picture

Version: 8.x-dev » 6.x-dev
StatusFileSize
new1.44 KB

D6 backport

naught101’s picture

Version: 6.x-dev » 8.x-dev
Status: Needs review » Closed (duplicate)

There's no way this is going to get into d6 core. Too much UI change, and probably bad for some module relying on existing permissions. Use http://drupal.org/project/config_perms for that.

Let's close as a duplicate of #446666: Split 'administer site configuration' into more granular permissions