How to exclude categories from recent posts, recent comments & category widgets?

I use the bellow function (thanks to @helgatheviking!) to exclude categories from the wordpress loop. It works very well – posts of selected categories are excluded from the loop on the main blog listing page, from category listing pages and from archives, but not from Recent Posts and not from Recent Comments in sidebar. How can be extended the action of this code also on them?

How can I let users to access plugin functions based on roles?

I use a plugin called “Live Edit” to let authors and editors edit the content front-end. But the issue is that the plugin lets any logged in users to edit the content. I want the edit(specified by plugin. Not the WP’s default edit button) button be accessed based on their roles. I don’t know how to make it accessible based on roles. So trying to make it appear only for the authors and higher roles to that.