New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

redirect loop when user tries to access page without permissions but doesn't have permissions for the dashboard too #2081

Closed
joker-777 opened this Issue Apr 9, 2013 · 6 comments

Comments

Projects
None yet
4 participants
@joker-777

joker-777 commented Apr 9, 2013

Is it possible to specify the redirect page when the user accesses a page without permissions?

@seanlinsley

This comment has been minimized.

Show comment
Hide comment
@seanlinsley

seanlinsley Apr 9, 2013

Member

Since we're using Devise, I'd expect so.

Member

seanlinsley commented Apr 9, 2013

Since we're using Devise, I'd expect so.

@joker-777

This comment has been minimized.

Show comment
Hide comment
@joker-777

joker-777 Apr 9, 2013

ah sorry...I wasn't clear enough. I meant permissions through the new cancan adapter.

joker-777 commented Apr 9, 2013

ah sorry...I wasn't clear enough. I meant permissions through the new cancan adapter.

@macfanatic

This comment has been minimized.

Show comment
Hide comment
@macfanatic

macfanatic Apr 9, 2013

Contributor

There is a new setting that you can add to your project in config/initializers/active_admin.rb, that will allow you to specify a method to be called on unauthorized access.

config.on_unauthorized_access = :access_denied
class ApplicationController
  def access_denied(exception)
    Rails.logger.error "access denied! '#{exception.message}'"
  end
end

The implementation of the current handler is located at: a5a5488#L10R130

Contributor

macfanatic commented Apr 9, 2013

There is a new setting that you can add to your project in config/initializers/active_admin.rb, that will allow you to specify a method to be called on unauthorized access.

config.on_unauthorized_access = :access_denied
class ApplicationController
  def access_denied(exception)
    Rails.logger.error "access denied! '#{exception.message}'"
  end
end

The implementation of the current handler is located at: a5a5488#L10R130

@macfanatic macfanatic closed this Apr 9, 2013

@joker-777

This comment has been minimized.

Show comment
Hide comment
@joker-777

joker-777 Apr 9, 2013

Thanks a lot!!! This helps.

joker-777 commented Apr 9, 2013

Thanks a lot!!! This helps.

@monfresh

This comment has been minimized.

Show comment
Hide comment
@monfresh

monfresh Jul 11, 2013

Contributor

Is this documented anywhere besides here? I ran into the same issue when trying to implement CanCan with ActiveAdmin 0.6, and the available documentation is out of date now.

Contributor

monfresh commented Jul 11, 2013

Is this documented anywhere besides here? I ran into the same issue when trying to implement CanCan with ActiveAdmin 0.6, and the available documentation is out of date now.

@seanlinsley

This comment has been minimized.

Show comment
Hide comment
Member

seanlinsley commented Jul 15, 2013

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment