Has anyone got CanCan authentication working? I have config.admin_auth = 'CmsCanCanAuth' but it fails with This action failed the check_authorization because it does not authorize_resource. Add skip_authorization_check to bypass this check. before it even reaches the custom auth module. Any help would be great!
config.admin_auth = 'CmsCanCanAuth'
This action failed the check_authorization because it does not authorize_resource. Add skip_authorization_check to bypass this check.
I never used CanCan. But what's happening exactly? It's not allowing access to authenticate before_filter?
@GBH Yes, it's checking for CanCan auth before it. Turns out you need to turn off check_authorization for comfy. You can do this by adding these lines to your application_controller:
check_authorization unless: :do_not_check_authorization?
controller_path.include? 'cms_admin' or controller_path.include? 'cms_content'
I think it's better to do the skip the check this way:
check_authorization :unless => :skip_authorization_check?