Hi there,
a) WordPress has its won User Roles and Capabilities:
https://wordpress.org/support/article/roles-and-capabilities/
And there are a few functions you can use the remove_cap()
function to remove them:
https://developer.wordpress.org/reference/classes/wp_role/remove_cap/
And you can use it in a PHP Snippet like so:
function remove_author_upload_media() {
// get_role returns an instance of WP_Role.
$role = get_role( 'author' );
$role->remove_cap( 'upload_files' );
}
add_action( 'init', 'remove_author_upload_media' );
This removes the upload_files
cap from the role of author
b) unfortunately i do not know how to do this. Have a look for a plugin for Advanced Media Manager