getgrav / getgrav/grav-plugin-admin
Question: Permission to create Pages in "folder"
- Dominant language
- PHP
- Stars
- 377
- Forks
- 225
- Avg merge
- 11h 51m
- Merged PRs (30d)
- 4
Description
Hello,
I want to allow some users to create new pages in certain "folders" e.g. to create a new blog post.
Adding a sub page fails with the following error: "You have insufficient permissions for task add."
This is my user which can edit a blog page but can not add a new blog post:
```yaml
state: enabled
email: xxx@example.com
fullname: 'Max Mustermann'
language: en
content_editor: default
twofa_enabled: true
twofa_secret: XXX
avatar: { }
hashed_password: XXX
groups:
- Employee
- FAQ
- Blogger
- KnowledgeBase
- ImageSources
access:
admin:
login: true
```
This is my `groups.yaml`:
```yaml
Employee:
access:
admin:
login: true
super: false
cache: true
configuration: false
pages:
read: true
list: true
maintenance: false
statistics: true
plugins: false
themes: false
tools: false
users: false
flex-objects: false
readableName: Employee
description: Employee
icon: user
enabled: true
FAQ:
access:
admin:
login: true
faq: true
readableName: FAQ
description: 'Can manage the FAQ'
icon: question-circle
enabled: true
Blogger:
access:
admin:
login: true
pages:
read: true
list: true
readableName: Blogger
description: 'Can manage Bloggposts'
enabled: true
KnowledgeBase:
access:
admin:
login: true
pages:
read: true
list: true
readableName: 'Knowledge Base'
description: 'Can manage the Knowledge-Base'
enabled: true
Legal:
access:
admin:
login: true
pages:
read: true
list: true
readableName: Legal
description: 'Can manage Legal content'
enabled: true
ImageSources:
access:
admin:
login: true
pages:
read: true
list: true
readableName: 'Image sources'
description: 'Can manage Image sources content'
enabled: true
```
This is the `blog.en.md` for example:
```yaml
---
title: Blog
blog_url: Blog
content:
items: '@self.children'
order:
by: date
dir: desc
filter:
published: true
permissions:
groups:
Blogger:
create: true
read: true
update: true
---
This is our blog!
===
Some md content…
```
When adding a page within the Parent Page (Blog):

The following error occurs:

How the groups / users / pages must be configured in order to allow sub page creation without giving the general "Pages create" role?
Thanks in advance!
Contributor guide
Research direction
Start with the permissions in groups.yaml and the permissions block in blog.en.md, then reproduce the failed subpage creation in the Grav admin. Trace how the Blogger group's page permissions and the Blog parent-page settings are combined; done means the required configuration or a confirmed permission defect is clearly identified.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php
- Domain
- authorization, content
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100