Q:

Disable all admin UI access to authors (except to custom post type add, edit and modify)

I just created a custom post type named Catalog. Where authors can create as many entries they need. But I need to restrict/deny access to all admin parts: Posts, Profile, Media or other admin parts except their Catalog entries.
Do I need to compare against $_SERVER['REQUEST_URI'] or theres a better way?
Thanks in advance.

A:

This is more difficult than it needs to be it seems. 
To code it without using a plugin I would suggest using global $menu and global $submenu as an array and unset them based on user role or user name. It might get more difficult if you want to define user role permissions outside default values.
http://codex.wordpress.org/Roles_and_Capabilities
You can find the values in wp-admin/menu.php , you must look in here.
Or browse them here http://core.trac.wordpress.org/browser/branches/3.1/wp-admin/menu.php
For example if you want to unset a menu in a function it would be something along the lines of:
function remove_menu() {
global $menu;
//remove post top level menu for editor role
if current_user_can('editor'){
unset($menu[5]); }
}
add_action('admin_head', 'remove_menu');
// ($menu[5]) is the "Posts" menu

You can see a much more detailed example here http://hungred.com/how-to/remove-wordpress-admin-menu-affecting-wordpress-core-system/

