The enabled function doesn't work. Even without it on the module still overwrites the permissions belonging to the url (see the screenshots). I have to remove the line to disable the config_perms_access_callback.

I think the problem is in the function config_perms_load. It loads all url's, even if it's disabled.

Comments

h3rj4n’s picture

StatusFileSize
new850 bytes

Found the solution in the function config_perms_menu_alter. The original:

function config_perms_menu_alter(&$items) {
  foreach (config_perms_perms() as $perm) {
    foreach ($perm->path as $path) {
      if($items[$path]) {
        $items[$path]['access callback'] = 'config_perms_access_callback';
        $items[$path]['access arguments'] = array($perm);
      }
    }
  }
  // administer themes:
  // TODO
  /*
  foreach (list_themes() as $theme) {
    $items['admin/build/themes/settings/'. $theme->name]['access callback'] = 'config_perms_themes_access';
    $items['admin/build/themes/settings/'. $theme->name]['access arguments'] = array($theme);
  }
  */
}

I added the folowing to the if statement:

if($items[$path] && $perm->status == 1) {

That fixed the problem for me.

h3rj4n’s picture

I guess the issue still exists with version 7. Can't see a solution in the code. Haven't tested it though.

h3rj4n’s picture

Status: Active » Needs review

Forgot to set it to review.

mlncn’s picture

Issue summary: View changes

I don't know about 6.x but this is fixed in 7.x