On a fresh install of Drupal 5.1, installing linktocontent does not trigger the adminrole module for setting the access rights to the "admin" role(s). As a result, an admin different from the Drupal super-admin (1st user created) will never see the Linktocontent administration page (/admin/settings/linktocontent), unless they manually edit the user permissions for linktocontent in access control (/admin/user/access).

I installed linktocontent 5.x-1.2, and a patched adminrole 5.x-1.1 containing the following required 3-line patch:

function adminrole_admin_settings() {
  $form = array();
  // [BTO]: Added the following 2 lines (http://drupal.org/files/issues/adminrole-5.x-1.1.patch)
  $u_roles = user_roles();
  ksort($u_roles);
  $form['adminrole_adminrole'] = array(
    '#type' => 'select',
    '#title' => t('Admin Roles'),
    '#default_value' => variable_get('adminrole_adminrole', 0),
    '#description' => t("Which Role is Admin?"),
    // [BTO] Replaced the following line:
    // '#options' => array_merge(array(0 => t('-- Please Select One --')), user_roles()),
    '#options' => array_merge(array(0 => t('-- Please Select One --')), $u_roles),
  );
  return system_settings_form($form);
}

Not sure whether it is a bug in linktocontent or in adminrole.

Best regards,

Olivier

Comments

ShutterFreak’s picture

Status: Active » Closed (fixed)

Please ignore this bug - the admin role was not set anymore on my system (tested with another installed module).

Sorry for the noise.