Jump to content

biniyam

Members
  • Posts

    3
  • Joined

  • Last visited

biniyam's Achievements

Newbie

Newbie (2/6)

1

Reputation

  1. @adrian Thank you so much, this fixed the issue.
  2. @adrian Thank you for your response. I have configured it exactly as you mentioned above (i.e. configured the module to "Role Specified Branch Parent" option & the admins via the form assigns the required role to the users for existing roles created by superusers). We have 'News' page and it's children are 'sports', 'politics', 'food' etc. and these children pages have corresponding roles as well. Whenever the admins add child pages to the 'News' page, a new role is created programmatically. For the existing roles('sports-editer', 'politics-editer', 'food-editer') the superuser has set branch restriction in the role setting manually. That means: if a user has a 'sports-editer' role, the user can only view/edit the 'sports' page. Now what we want is, for future creation of 'News' page children pages, we want to set the branch restriction via a PHP script. The reason being the client do not want the 'admins' to have access to Admin Restrict Branch Module, Access>Users, Access>Roles etc., there is a form prepared for such tasks for the admins. I am just wondering if there is a way something like this: $role = new Role(); $role->name = 'sports-editor'; $role->admin_restrict_branch = $sportsPage->id; $role->save(); Thank you.
  3. Hey. I am a beginner in Processwire, can someone help please me with an issue: Is there a way to restrict a role (e.g. 'sports-editor-role') to a page (e.g. 'sports-page') automatically via a PHP script? Only the superusers has access to Admin Restrict Branch, we have prepared a form for admins to assign roles to member users.
×
×
  • Create New...