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

Trouble getting access to work

Solved by Harald Schneider View solution

Started by Arno Rog 6 years ago · 3 replies · 336 views
6 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.

6 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
6 years ago

This was bugging me for some time.
It works great

Can this be incorporated in the excellent Manual?

6 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 Thomas, 1 week ago
2 52 8 hours ago
Support · by Anna, 3 days ago
2 59 11 hours ago
Support · by Justin Young, 12 hours ago
1 30 11 hours ago
Support · by Duc , 1 week ago
2 65 5 days ago
Support · by Colin Hume, 1 week ago
2 56 5 days ago