-
Notifications
You must be signed in to change notification settings - Fork 127
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
Restrict access to docs #22
Comments
Mount the engine within a constraint or inherit the controller. Both are pretty basic approaches. I think devise even has an "authenticated" routing constraint. Jeremy Jackson
|
I've been trying to extend the controller with no luck. The extended controller would never be called. |
https://github.com/plataformatec/devise/blob/master/lib/devise/rails/routes.rb#L295
authenticated do
mount Apitome::Engine => '/your_custom_path'
end You can adjust the authenticated constraint as you need, as outlined in the code at the above link. It should be noted that this isn't at all related to apitome, but you're welcome. =) |
Many thanks for the tip.
|
cool. you can omit the index method fyi, as it will make it into the super by default. |
I'd like to restrict access to the documentation to logged-in users. I use devise for authentication. I guess this is not implemented, right?
The text was updated successfully, but these errors were encountered: