thomas Posted May 3, 2017 Posted May 3, 2017 Hi, I was wondering if there was an fast & easy method to find out if a logged in user is allowed to duplicate a given page (or create a page with the same template & parent). This should take into account the template settings and user permissions. Is there? Thanks, thomas
arjen Posted May 3, 2017 Posted May 3, 2017 Check if you have installed the ProcessPageClone (/processwire/module/edit?name=ProcessPageClone) module. This installs a few permissions: You could check if these are stored on the role of your user. If you want to monitor changes by users on pages be sure to look at ProcessChangeLog or MarkupActivityLog. 3
Robin S Posted May 4, 2017 Posted May 4, 2017 I think this would do the job: $cloneable = $page->parent->addable($page); // boolean true/false Plus check that the user has the page-clone permission, as @arjen suggested. 2
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now