I have content on my site which is only accessable by certain roles. If a role who doesnt have relevant permissions tries to access the content, I would like a message saying you need to be RoleX to access this content, click here to become RoleX.

Are their any modules with this funtionallity. The only modules I find are ones where the user can select roles on signup, or have to change their roles add user/%/edit. But I would like them to be able to change their Role on any page. Is this possible.

How complicated would it be to set up a module like this?

Thanks for any help.