Copy function for view only pages - #1202
Conversation
Update From Bookstack
…e but can't update it.
|
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 -
|
… chapter to copy.
|
Hi @ssddanbrown , I've updated to use the joint_permissions table. It's all done in one query so it should be performant. I've confirmed that it works with overridden permissions. Have I understood the requirements correctly? |
|
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. |
Hi @ssddanbrown ,
I'd like to open a pull request to handle the ability to copy a read only page as discussed in #1199
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.
A user doesn't select a destination and pushes the copy button. And a variation when a user attempts to copy a page but does not have an existing destination available to copy it too.
How do you want to handle this?
What else do I need to consider?