Jump to content


  • Posts

  • Joined

  • Last visited

Community Answers

  1. Spica's post in role based processwire/page/ was marked as the answer   
    Finally I ended up with this two modules:
  2. Spica's post in page-edit-created was marked as the answer   
    So I ended up with an own hook and an additional permission (without page-edit-created permission installed). This should only restrict users with the assigned permission to edit its own created pages. Seems to work. Reviews appreciated.
    public function init() { if(!$this->user->hasRole("superuser")) $this->addHookAfter('Page::editable', $this, 'checkEditable'); } public function checkEditable(HookEvent $event){ $page = $event->object; if($this->user->hasPermission('page-edit-created-onlyassigned') && $page->created_users_id != $this->user->id) { $event->return = false; } }
  3. Spica's post in permissions stick to pages or roles was marked as the answer   
    Found it.
    The pages with resticted permissions were published. Role did not have publish permission, which also seems to withdraw the editing permission.
  4. Spica's post in Preconfigured Lister in Custom Admin Page was marked as the answer   
    To use it in a AdminTemplate I had to change it to
    $table = $modules->get("MarkupAdminDataTable"); $table->headerRow( ["Title", "ID", "Created", "User"] ); foreach($pages->find("created_users_id=".$user->id) as $page){ $data = array( // Values with a sting key are converter to a link: title => link $page->title => $config->urls->admin."page/edit/?id=".$page->id, $page->id, date("F j, Y", $page->created), $page->createdUser->name ); $table->row($data); } // $table->footerRow( $someArray ); echo $table->render(); and ad a missing $
    Or would you recommend to use it as a modul over a custom admin template?
    And how to integrate the view/edit etc Buttons as in the tree view?
  • Create New...