PlugIn RoleRequirement and redirects
I need authorisation in my application and stumbled upon the plugin RoleRequirement. It works fine. But I don't like the default behaviour when a user doesn't have proper rights to request an action. The default is just:
I changed that line in the method access_denied to
render :nothing => true, :status => 401
There are two things I don't like with this solution. First I want to avoid to change the plugin's code ... or is it ok to change files in the lib directory? Second - what could I do if I need different redirect targets? Is there a way to overwrite the original method?