Jump to content
verdeandrea

Per branch permission

Recommended Posts

Hi guys,

I have this structure:

- page group A (template group)
--- events group A (template group_events_list)
------ event 1 (template group_event)
------ event 2 (template group_event)
...
--- news group A (template group_news_list)
------ news 1 (template group_news)
------ news 2 (template group_news)
...

- page group B (template group)
--- events group B (template group_events_list)
------ event 1 (template group_event)
------ event 2 (template group_event)
...
--- news group B (template group_news_list)
------ news 1 (template group_news)
------ news 2 (template group_news)
...

- page group C (template group)
--- events group C (template group_events_list)
------ event 1 (template group_event)
------ event 2 (template group_event)
...
--- news group C (template group_news_list)
------ news 1 (template group_news)
------ news 2 (template group_news)
...

So every group has the same structure with events and news but they share the same template. Now, i would like to limit access for group admin to a specific group branch so that the group A admin, can access, edit, and create/delete new pages for group A, but i can not edit other group. The same for group B admin, and so on.

I understand that the best idea would be to use a template - role access, but i don't want to create a different template for every group, since every group page has the same fields, structure etc.

I've tried this module http://modules.processwire.com/modules/page-edit-per-user/ (even if it says just to pw 2.4 and i'm using pw 2.7.2) and i can limit access to just one group per user, but just for editing pages, not for creating new ones. And if i give page creation permission to a template, let's say group_events_list, for a specific role, than that role can create pages for every group events.

How can i limit editing and creating permission just for a single group (and its children pages) per user. Is it possible?

Thanks a lot!

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.

  • Similar Content

    • By Pip
      Hi everyone!
      I'm trying out the Login/Register module for my site. Noted that the module assigns the newly registered user to login-register role. 
      Once you modify the login-register role's permissions, particularly adding page-edit, the new member role will be set to guest. 
      Thing is I'd like to grant my new users the power to create their own pages. Any advice? 
      Thanks. 
    • By snck
      Hey,
      I want my editors to be able to use the page lister, especially the bookmarks. I added the page-lister permission to the editor role, but Page lister ("Find" menu item) does not show. Is there anything else I have to do? Links to bookmarks work for the editors, but I would be glad to show them the menu item as well.
      Maybe this has something to do with the long history of the site (started with ProcessWire 2.4 and upgraded to 3.0.148 over the years)?
      Thanks,
      Flo 
    • By Greg Lumley
      Hi! I've just discovered Processwire and I'm absolutely loving how clean it is. Especially with the full control over what it outputs. 
      Excuse me if this is a really stupid question.
      What happens if a user wants to insert multiple images into the blog field? In other words Shift+Click all the images attached to a specific page in and insert. It seems I can insert one at a time but not multiple.

      Based on the above, I want to rebuild my website. I'm a photographer (ex php dev 2004) and plan also to target websites at other photographers. So inserting multiple images into blog posts is a key part. I'd like to output that to something like UIkit or some kind of Masonry Gallery script. Any thoughts would be fantastic please. 
      Thank you.
      Greg. 
      I'm an ex PHP developer now photographer, now thanks to Corona and not photo work, a rusty PHP developer 😁
    • By snck
      Hello,
      for a project I have pages with different “content areas“ that can be edited only by specific user roles. In the past I setup a fieldset (tab) containing all the fields that should be available to only one specific group of users and set the fields' view and edit permissions (in the Access tab) accordingly. The result was as expected: Users assigned to the specific role could see the tab, click on it, edit content, users without the role could not see the tab. After updating this installation to 3.0.148 yesterday I wanted to setup another tab following the same principle, but I have no "Access" tab for the fieldset to limit access to the specific role. I even tried cloning an existing (and still working) fieldset. The existing fieldset has some template overrides (screenshot attached) that lead to the desired behaviour, but I am not able to reproduce these settings because there is not "Access" tab for my fieldset in template context either.
      Is this a bug in 3.0.148? Has the fieldset fieldtype changed? Am I missing anything here?
      I am glad to hear from you guys.
      Cheers,
      Flo

    • By fruid
      Hi,
      this is the first time I'm using ProcessWire.
      I thought I get how fields, template and pages work, but when I create a template in the CMS, it doesn't generate any file in site/templates/
      Then I thought I might need to create a blank file myself manually on the FTP (which already seems odd to me).
      Once I did that, I tried to add fields to the template but again, doesn't write to the php file.
      When I create a new page and apply said template to it, the page stay blank.
      AFAIK the mod_rewrite of the apache is on and I went for the worst case scenario described here https://processwire.com/docs/security/file-permissions/ and set all file-permissions for future files to 0666 and folders to 0777 in the config.php
      What am I not getting and what am I doing wrong?
      Help is appreciated, stay save everybody,
      Fred
×
×
  • Create New...