2 yabba Aug 19, 2008 20:09

Bummer.
Sorry 'bout the way late bump on this, but does anyone have a solution? Or even a hint at where I can start hacking up a solution? I'm thinking maybe if I can get the Tools tab out of the group that is controlled by "System admin permissions" settings option (group management eh?) then the bug might go away AND a noob user would not even see the blog & general settings.
Isn't it fixed in CVS?
Dunno. I see comments in the code in 246 indicating it is sort of known that putting tools in with blog permissions means locking out plugin tabs as well.
I figure I'll put a few hours into it and see if I want to continue, or just deal with the users getting scared of too much stuff to see...
FYI this still seems to be the case in 247. Reckon I'll have to fix it myself.
Open skins_adm/admin_UI_general.class.php to approximately line 732 where you hopefully will find
foreach( $menuEntries as $loop_key => $loop_details )
{
$anchor = '<a href="';
Now change it to this:
foreach( $menuEntries as $loop_key => $loop_details )
{
if( ! isset($loop_details['text']) )
{
continue;
}
$anchor = '<a href="';
Now I don't have to make the Tools tab accessible to people who have no need of it just because I have plugins that create subtabs in there :)
/plugins/your_groovy_plugin/_your_groovy.plugin.php
function AdminAfterMenuInit()
{ // add our tab
global $current_User;
if( $current_User->check_perm( 'options', 'edit', false ) )
{ // user has permission to play with plugins
$this->register_menu_entry( 'AM BOPIT' );
require_css( $this->get_plugin_url().'am_bopit.css', true );
}
}
;)
¥
I thought about maybe making plugins be smart enough to do ... uh ... do the thing you're saying you can make it do, but that would mean editing any plugin that might make a tool tab. So I went for a dummy approach: find the thing that makes it sad and cheat it into faking happiness ;)
No wonder all your ex-wives left yah ;)
¥
They see the error if there's any plugin that has a tool tab ;)
¥