Skip to content
● Critical PHP security fixes are out: update PHP on your Grav sites. What to do →

Trouble getting access to work

Solved by Harald Schneider View solution

Started by Arno Rog 7 years ago · 3 replies · 680 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 webmasterodp, 2 weeks ago
4 251 2 weeks ago
Support · by nwhitfield, 2 weeks ago
2 217 2 weeks ago
Support · by stell, 4 weeks ago
5 462 3 weeks ago
Support · by gravinator, 2 months ago
5 639 3 weeks ago
Support · by Gravver, 1 month ago
6 432 4 weeks ago