Permission Bug - Page create fails within chapter if lacking permissions to view the parent book #734

Closed
opened 2026-02-04 22:06:16 +03:00 by OVERLORD · 2 comments
Owner

Originally created by @andresilva-cc on GitHub (Jul 3, 2018).

First, let me explain what I'm trying to do:
I have a book which is composed of several chapters. There's a new user who needs access to only a specific chapter in this book, he should be able to create and edit pages in this chapter, but he shouldn't be able to see the other chapters.

Before this modification, I activated custom permission for this book, where group "Telecom" has full access to it, and all chapters inherit this permission. So what I tried to do is: I activated the custom permissions on this chapter, enabled full access to "Telecom" group (to keep this permission), but I also enabled full access to the group this user belongs (it's a "personal" group, only he is in the group). So the permissions are like this:

2018-07-03_095802

So, what I realized is that he can't see the book. Ok, that's fine, I think that was expected, he can still access the chapter by using the URL or in the recents panel. The problem is, he can't create new pages, it gives him a 404 error.

I can't understand why this is happening, I gave full access to the chapter, but he still can't create new pages. I can solve this by enabling some permissions on the book itself, but then he would be able to see all the chapters.

Originally created by @andresilva-cc on GitHub (Jul 3, 2018). First, let me explain what I'm trying to do: I have a book which is composed of several chapters. There's a new user who needs access to only a specific chapter in this book, he should be able to create and edit pages in this chapter, but he shouldn't be able to see the other chapters. Before this modification, I activated custom permission for this book, where group "Telecom" has full access to it, and all chapters inherit this permission. So what I tried to do is: I activated the custom permissions on this chapter, enabled full access to "Telecom" group (to keep this permission), but I also enabled full access to the group this user belongs (it's a "personal" group, only he is in the group). So the permissions are like this: ![2018-07-03_095802](https://user-images.githubusercontent.com/15927886/42221219-c32736c4-7ea7-11e8-86e5-06f195722667.png) So, what I realized is that he can't see the book. Ok, that's fine, I think that was expected, he can still access the chapter by using the URL or in the recents panel. The problem is, he can't create new pages, it gives him a 404 error. I can't understand why this is happening, I gave full access to the chapter, but he still can't create new pages. I can solve this by enabling some permissions on the book itself, but then he would be able to see all the chapters.
OVERLORD added the 🐛 Bug label 2026-02-04 22:06:16 +03:00
Author
Owner

@andresilva-cc commented on GitHub (Jul 9, 2018):

Anyone?

@andresilva-cc commented on GitHub (Jul 9, 2018): Anyone?
Author
Owner

@ssddanbrown commented on GitHub (Jul 14, 2018):

Hi @DeehSlash, Thanks for reporting and sorry for the slow response, It's taken me a couple of goes to understand your exact scenario. I understand the issue now and can confirm the bug.

I've marked the fix for the next release.

Developer Notes

At some point during page creation the book is searched for within Entity repo. This needs to be carefully changed to ignore view permissions, If it's required at all.

@ssddanbrown commented on GitHub (Jul 14, 2018): Hi @DeehSlash, Thanks for reporting and sorry for the slow response, It's taken me a couple of goes to understand your exact scenario. I understand the issue now and can confirm the bug. I've marked the fix for the next release. ### Developer Notes At some point during page creation the book is searched for within Entity repo. This needs to be carefully changed to ignore view permissions, If it's required at all.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/BookStack#734