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 →

Trouble getting access to work

Solved by Harald Schneider View solution

Started by Arno Rog 7 years ago · 3 replies · 751 views
7 years ago

I can't get group access to work as expected.
I've user1 member of group1, and user2, member of group2

What is needed in the frontmatter to:
give user1 access to page1, but not not page2
give user2 access to page2, but not not page1

All I've got till now is:

YAML
access:
    site:
        login: true
        group1: true

But both users can see this page.

7 years ago Solution

Example for group1:
This goes into your page's frontmatter:

YAML
access:
    site.group1: true

The corresponding part in user/config/groups.yaml has to look like this:

YAML
group1:
  groupname: group1
  access:
    site:
      login: 'true'
      group1: true
last edited 01/31/20 by Harald Schneider
7 years ago

This was bugging me for some time.
It works great

Can this be incorporated in the excellent Manual?

7 years ago

I second this, too. You are right, the existing manual is misleading at this topic.

Suggested topics

Topic Participants Replies Views Activity
Support · by Anna, 4 days ago
1 96 4 days ago
Support · by Anna, 3 weeks ago
1 265 3 weeks ago
Support · by webmasterodp, 1 month ago
4 380 1 month ago
Support · by nwhitfield, 1 month ago
2 351 1 month ago
Support · by stell, 2 months ago
5 657 1 month ago