Index: modules/system/system.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/system/system.module,v
retrieving revision 1.585.2.60
diff -u -p -r1.585.2.60 system.module
--- modules/system/system.module	15 Dec 2010 21:34:35 -0000	1.585.2.60
+++ modules/system/system.module	7 Feb 2011 19:44:52 -0000
@@ -530,8 +530,9 @@ function _system_themes_access($theme) {
  * Implementation of hook_init().
  */
 function system_init() {
-  // Use the administrative theme if the user is looking at a page in the admin/* path.
-  if (arg(0) == 'admin' || (variable_get('node_admin_theme', '0') && arg(0) == 'node' && (arg(1) == 'add' || arg(2) == 'edit'))) {
+  // Use the administrative theme if the user is looking at a page in the admin/* path, and they have permissions to that path.
+  $menu_item = menu_get_item($_GET['q']);
+  if ($menu_item['access'] && (arg(0) == 'admin' || (variable_get('node_admin_theme', '0') && arg(0) == 'node' && (arg(1) == 'add' || arg(2) == 'edit')))) {
     global $custom_theme;
     $custom_theme = variable_get('admin_theme', '0');
     drupal_add_css(drupal_get_path('module', 'system') .'/admin.css', 'module');
