Skip to content
Grav 2.0 is officially stable. Read the announcement →

Community guidelines

Please keep discussions civil and on-topic. Repeated violations may lead to a temporary ban.

Support

User restricted pages doesn't work

Started by yehuda 4 years ago · 2 replies · 391 views
4 years ago

I've tried everything restricting to pages to only allow logged-in users just doesn't work in the latest version of grav.

anyone else who has trouble figuring it out?

some help

4 years ago

@yehudac,

  • Please share how you've tried implementing access to page for logged in users only.
  • Has any of above implementations worked before? If so what has changed?

The following works fine IMHO:

  • Installed fresh Grav 1.7.33 + Admin
  • Logged in to Admin to create an account
  • Added the following to frontmatter of page Typography (either using Admin or filesystem):
    YAML
    access:
    site:
      login: true
    
  • Browsed to http://localhost/typography and a login screen is presented.
last edited 05/27/22 by pamtbaau
4 years ago

@pamtbaau
i did that and it works. The thing is when I do it on the admin I didn't guess that this was the correct formula

Site (site): Allowed

shouldn't it be, as I always tried

Site (site): Denied

Default: Denied

Login to Site (site.login): Allowed

but that allows anyone straight through!!

last edited 05/27/22 by yehuda

Suggested topics

Topic Participants Replies Views Activity
Support · by Thomas, 1 week ago
2 50 6 hours ago
Support · by Anna, 2 days ago
2 58 9 hours ago
Support · by Justin Young, 10 hours ago
1 28 10 hours ago
Support · by Duc , 1 week ago
2 63 5 days ago
Support · by Colin Hume, 1 week ago
2 53 5 days ago