mitcho / shibboleth

WordPress Shibboleth plugin
23 stars 23 forks source link

Shibboleth menu is not limited to network admins #8

Closed ghost closed 8 years ago

ghost commented 10 years ago

In multisites, the Shibboleth menu appears under each individual site, and each site admin can make global changes to the shibboleth settings which are affecting all sites. This menu should be removed from individual sites, and inserted in its proper place, most likely in the Settings menu only visible to the network admin.

I found this possible solution: http://wordpress.org/support/topic/shibboleth-plugin-needs-maintenance-help which seems to work, but I'm not a WordPress plugin developer.

Here is a diff of the file wp-content/plugins/shibboleth/options-admin.php to modify:

< // begin changes
<   //add_action('admin_menu', 'shibboleth_admin_panels');
<   add_action( 'network_admin_menu', 'shibboleth_network' );
< function shibboleth_network() {
<         $hookname = add_submenu_page('settings.php', __('Shibboleth Options', 'shibboleth'),
<                 __('Shibboleth', 'shibboleth'), 8, 'shibboleth-options', 'shibboleth_options_page' );
< }
< // end of changes

---
>   add_action('admin_menu', 'shibboleth_admin_panels');

See more discussions in the support forum http://wordpress.org/support/topic/shibboleth-options-on-multisite-wordpress-installation

mitcho commented 10 years ago

Please try the latest development version. The changed file is here:

https://github.com/mitcho/shibboleth/blob/master/options-admin.php

lukaiser commented 10 years ago

Tested it on a multisite installation. Works as expected!

mitcho commented 8 years ago

Pushing this with version 1.7