I just discovered this module, and I love it! Great idea, and such a time saver. However, I do have one problem:

The menu link to /admin/plugin_manager is visible, and the page is accessible, to users who have permission to 'access administration pages'. I however don't want the users to be able to see or use the module at all. I could disable the menu link, but that is a bit of a pain in the butt for me, as I would like to have the link for myself.

I got around this by changing the code. I changed this:

function plugin_manager_perm() {
  return array('manual install plugins', 'install plugins', 'plugin manager settings', 'uninstall plugins');
}

to this:

function plugin_manager_perm() {
  return array('access plugin manager', 'manual install plugins', 'install plugins', 'plugin manager settings', 'uninstall plugins');
}

then I changed this:

function plugin_manager_menu() {
  $items['admin/plugin_manager'] = array(
    'title' => 'Plugin Manager',
    'description' => 'Automatically install new content.',
    'page callback' => 'drupal_get_form',
    'page arguments' => array('plugin_manager_find'),
    'access arguments' => array('access administration pages'),
    'file' => 'plugin_manager.admin.inc',
    'position' => 'right',
    'weight' => -7,
  );

to this:

function plugin_manager_menu() {
  $items['admin/plugin_manager'] = array(
    'title' => 'Plugin Manager',
    'description' => 'Automatically install new content.',
    'page callback' => 'drupal_get_form',
    'page arguments' => array('plugin_manager_find'),
    'access arguments' => array('access plugin manager'),
    'file' => 'plugin_manager.admin.inc',
    'position' => 'right',
    'weight' => -7,
  );

This (as I'm sure you can tell, but I'm adding it for other users' benefit) adds an extra access level to the permissions table called 'access plugin manager'. Users without this access have no access to even the top page of this module, which means that it will not appear in their menus.

Comments

jabapyth’s picture

could you make that into a patch?
thanks for the heads up

jaypan’s picture

I honestly have no idea whatsoever about how to make a patch! I can't even figure out how to install them. Sorry! I would be happy to do it if I could, but I'm just a lowly php coder :)

jabapyth’s picture

Assigned: Unassigned » jabapyth
Status: Active » Fixed

thats cool ;) everyone has a first time.
if you are running linux, its really easy (google "patch linux" or something like that)
if not....well sometimes your CVS client will have patch-making capabilities.
Anyway, I'll go ahead and make a patch :]

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.