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

Custom page access rules unclear

Started by Muut Archive 10 years ago · 4 replies · 589 views
10 years ago

Hi Andy,

could you give us an example of the yaml headers needed to have a custom access rule.
For example: I want to allow a certain user access to only certain pages, forbid him to edit others. How exactly do we have configure this?

10 years ago

Currently there is no per-page editing ACL in Admin.

If a user is granted access to edit a page, it can edit other pages too.

10 years ago

If you are talking about frontend page restrictions (not admin), then you could put something like this in the page header:

YAML
access:
  site.login: true
  site.private: true

Then you just need to ensure the user has site.private access:

YAML
email: j[email protected]
fullname: Johnny Appleseed
access:
  site:
    login: true
    private: true

There really are no restrictions on this.. you can call it anything you like. You just have to ensure your user has the matching access to the page.

10 years ago

Well, In fact I indeed meant restricting the admin access to certain pages

Suggested topics

Topic Participants Replies Views Activity
Archive · by Deleted User, 9 years ago
0 1354 9 years ago
Archive · by Muut Archive, 9 years ago
2 935 9 years ago
Archive · by Muut Archive, 9 years ago
2 4065 9 years ago
Archive · by Muut Archive, 9 years ago
1 2953 9 years ago
Archive · by Muut Archive, 9 years ago
3 1119 9 years ago