Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.Sign up
Copy function for view only pages #1202
This request is not yet complete.
Currently if a user has at least one of 'create page own' or 'create page all' then the option to copy the page is available. I deemed this as a prerequisite of any copy functionality.
There are (at least) two outstanding issues.
How do you want to handle this?
What else do I need to consider?
Thanks for offering this pull request @mark-james. To properly cover the issue this is going to need some deeper changes.
We can't simply check the
BookStack keeps a record of role-to-entity permissions in the
Thanks for the feedback @ssddanbrown , I'll use the joint_permissions table as you suggest.
I'm a little fuzzy on why. Is it because just using the role permissions doesn't account for pages that have been overridden? Is this what you mean by entity level?
I'm assuming taking this approach also handles at least part of the issue I raised initially - "when a user attempts to copy a page but does not have an existing destination available to copy it too"? Eg. They can create pages but don't currently have a available book to do so.
Finally how do you want me to handle the scenario when a user doesn't select a destination to copy the page too. We could either -
Thanks for this @mark-james, Sorry for the delay in my response.
Your latest changes did exactly what I desired in my last comment so all way good-to-go.
The will be in the next patch release.