I seems strange that I did not find any issues regarding this issue but Admin theme is not working for other roles than administrator.

I even removed the permission from administrator role and then user in this role could still use admin theme.

Looks like this permission is hard coded into "administration" role and that "Access administration theme" is not even working.

Comments

iztok’s picture

I debugged the code a bit and came to this conclusions:
- When visiting pages like /admin/* admin_menu module does not retun admin theme, but the default "admin theme" in D7 core does.

- If you put the following paths in the "USE ADMINISTRATION THEME ON THE FOLLOWING PAGES" list:

admin
admin/*
node/add/*
node/*/*

The code from the admin_theme will run and other roles than "administrator" will be able to use administration theme. This is new in D7 because in D6 there was no default admin theme management in core.

akanik’s picture

Iztok, I am having the same issue. Thanks for the info, but where is the field "USE ADMINISTRATION THEME ON THE FOLLOWING PAGES"?

aneeshaider’s picture

you will have to install Administration theme module (http://drupal.org/project/admin_theme) then you will get the field "USE ADMINISTRATION THEME ON THE FOLLOWING PAGES" in module configuration page.

jkaine’s picture

aneeshaider, thanks for the note on the admin theme module. That's a life saver.

ericaordinary’s picture

Aneeshaider, could you confirm which administration page this field appears in, and that it is working in D7? I've enabled the Admin Theme module but can't see that field on the theme configuration page.

pelicani’s picture

We were trying to find the Administration Theme setting pages in D7 too.

They were found at the bottom of this page...
http://example.com/admin/appearance

erok415’s picture

I searched for how to enable the admin theme for different roles too and found that you can enable it here yourdomain.com/admin/people/permissions/list.

Use the administration pages and help
View the administration theme 

Just enable it for the roles that you want to view the admin theme. I test it and it works perfectly.

Thanks to item post #6 for getting me pointed in the right direction. BTW, post #6 didn't work for me even though the settings were there and already set.
E.

spenoir’s picture

Updated list of admin theme paths:

admin
admin/*
node/add/*
node/*/*
node/*
user/*
forestmars’s picture

If you are trying to give non-admin users access to the dashboard, and being thwarted by the surprising admin theme behaviour described above, here is a workaround which does not require any additional modules such as Admin Theme.

  1. Change administration theme to default theme
  2. Assign blocks you wish non-admin users to access, to dashboard regions for this theme.
  3. (Make sure any necessary permissions are given, and test as the non-admin user.)
  4. Switch the administration theme back to your preferred administration theme.
  5. You should see the non-admin user still has access to those dashboard items in the site's default theme, as those settings are still stored in the database.