This code snippet is handy for preventing subscribers from having access to /wp-admin/. You can change the wp_user_level to whichever roles you want.

# Disable access to wp-admin for Subscribers
 
if ( is_user_logged_in() && is_admin() ) { 
 
global $current_user; 
get_currentuserinfo(); 
$user_info = get_userdata($current_user->ID); 
 
if ( $user_info->wp_user_level == 0 ) 
{ 
header( 'Location: '.get_bloginfo('home').'/wp-login.php?redirect='.get_bloginfo('home').'/wp-admin/' ); 
} 
} 
Happy
Happy
0 %
Sad
Sad
0 %
Excited
Excited
0 %
Sleepy
Sleepy
0 %
Angry
Angry
0 %
Surprise
Surprise
0 %