Skip to content
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

Protecting collections or content routes #152

Closed
mikemartin opened this issue Jul 19, 2020 · 3 comments
Closed

Protecting collections or content routes #152

mikemartin opened this issue Jul 19, 2020 · 3 comments

Comments

@mikemartin
Copy link
Contributor

mikemartin commented Jul 19, 2020

Hey guys,
I'm not sure if this is simply omitted in the Protecting Content doc or a bug. There seems to be no information about protecting collection entries or content routes. Neither of my below examples seem to work.

Collection entries
I would expect to be able to add the protect: logged_in to my collection.yaml, for example:

title: 'Collection'
template: collection/show
layout: layout
protect: logged_in

Content routes
For statamic's content routes I'd also expect to be able to pass my protect config like this:

Route::statamic('/alternate-collection-url/{slug}', 'collection/show', ['protect' => 'logged_in']);
@jackmcdade
Copy link
Member

jackmcdade commented Jul 19, 2020 via email

@mikemartin
Copy link
Contributor Author

@jackmcdade Yes. But I don't see any instructions for Collections or Routes.

jackmcdade added a commit that referenced this issue May 13, 2021
@jackmcdade
Copy link
Member

@mikemartin I documented the collections bit, but there is currently no way to apply protect to routes. So, we'll call that FR and close this issue since it's not a docs thing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants