1 tilqicom Oct 08, 2008 04:00
3 tilqicom Oct 08, 2008 17:25
brandonh wrote:
how many admins do you have?
one and only (:
to be more specific; i dont want them to see "Dashboard" and 'global' tabs and subtabs...
and they also see the blogs they are not member of despite the fact that i ve turned on advanced group perms and make the user group 'not member' of default blogs..it's not that they can do anything with those blogs, but i dont want them to be seen either,
4 sam2kb Oct 08, 2008 19:49
Userblog plugin does what you want.
Make a plugin and add this code in AdminAfterMenuInit function
// Hide backoffice menu entries from all users
if( !empty( $AdminUI->_menus['entries']['blogs']['entries']['features'] ) )
unset( $AdminUI->_menus['entries']['blogs']['entries']['features'] );
if( !empty( $AdminUI->_menus['entries']['blogs']['entries']['urls'] ) )
unset( $AdminUI->_menus['entries']['blogs']['entries']['urls'] );
Tabs are hidden now, but smart users can type url and see the content, so we need to redirect them from those tabs.
// Redirect all smart users
if( isset($_GET['ctrl'], $_GET['tab']) &&
$_GET['ctrl'] == 'coll_settings' &&
( $_GET['tab'] == 'features' ||
$_GET['tab'] == 'urls' )
)
{
$Messages->add( $this->T_('You have no permission to view the requested page!'), 'error' );
header_redirect( $_SERVER['PHP_SELF'].'?ctrl=coll_settings&blog='.$blog );
}
It's probably better to use param() instead of $_GET because the most smartest users can send $_POST requests to protected tabs.
The $_SERVER['PHP_SELF'] part should be replaced with regenerate_url function, but it's another story.
5 tilqicom Oct 08, 2008 20:45
sam2kb wrote:
Userblog plugin does what you want.
Make a plugin and add this code in AdminAfterMenuInit function
// Hide backoffice menu entries from all users if( !empty( $AdminUI->_menus['entries']['blogs']['entries']['features'] ) ) unset( $AdminUI->_menus['entries']['blogs']['entries']['features'] ); if( !empty( $AdminUI->_menus['entries']['blogs']['entries']['urls'] ) ) unset( $AdminUI->_menus['entries']['blogs']['entries']['urls'] );
Tabs are hidden now, but smart users can type url and see the content, so we need to redirect them from those tabs.
// Redirect all smart users if( isset($_GET['ctrl'], $_GET['tab']) && $_GET['ctrl'] == 'coll_settings' && ( $_GET['tab'] == 'features' || $_GET['tab'] == 'urls' ) ) { $Messages->add( $this->T_('You have no permission to view the requested page!'), 'error' ); header_redirect( $_SERVER['PHP_SELF'].'?ctrl=coll_settings&blog='.$blog ); }
It's probably better to use param() instead of $_GET because the most smartest users can send $_POST requests to protected tabs.
The $_SERVER['PHP_SELF'] part should be replaced with regenerate_url function, but it's another story.
that looks very likely to work (: thanks for help sam2kb, i ll give it a try asap
how many admins do you have?