Skip to content
● Meet Grav Guard: keep every Grav site you run secure and up to date, all from one place. Free for up to 3 sites. Read more →

User restricted pages doesn't work

Started by yehuda 5 years ago · 2 replies · 838 views
5 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

5 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
5 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 TomW, 2 weeks ago
8 225 8 hours ago
Support · by alex, 2 months ago
8 666 23 hours ago
Support · by Supple, 5 days ago
1 97 1 day ago
Support · by TomW, 1 week ago
3 158 3 days ago
Support · by TomW, 6 days ago
2 105 5 days ago