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

User restricted pages doesn't work

Started by yehuda 4 years ago · 2 replies · 463 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 BenLaKnet, 5 days ago
1 121 2 days ago
Support · by BenLaKnet, 1 week ago
5 195 2 days ago
Support · by kskt, 2 days ago
0 44 2 days ago
Support · by David Meissner, 3 days ago
0 43 3 days ago
Support · by David Meissner, 3 days ago
3 92 3 days ago