a-ok Posted March 27, 2018 Share Posted March 27, 2018 Hi folks, I have a contributors specific role set up on PW which allows them to add and edit only their own page(s) to a parent page (Events > event) and have managed to do this by setting up specific template permissions but also include the following in my ready.php file (so they only see their own pages) function eSubmissionPermissions($event) { $page = $event->object; if (!$event->return) return; if ($page->template->name == "events-detail" && $event->user->id !== $page->createdUser->id) { $event->return = false; } else { $event->return = true; } } if ($user->hasRole('e-submission')) { // Ony required for 'e-submissions' $wire->addHookAfter("Page::listable", null, "eSubmissionPermissions"); } This all works fine but there's one issue. I have a RepeaterMatrix set up for flexible content and the user/role can add to this fine if the content is text but when they go to add an image it states 'You don't have access to edit' when adding the image. Is there anything extra I should be doing in order to allow this? They can add an image fine that isn't in the RepeaterMatrix. I am using PW 3.0.80. It's also maybe worth noting that I am not allowing this user to publish pages (only save them) as this will be done by the admin on successful admission. Link to comment Share on other sites More sharing options...
elabx Posted March 27, 2018 Share Posted March 27, 2018 Maybe it's a permission issue in the repeater matrix template used by the repeater matrix field?? Though makes me wonder why it works on Text type because that one uses the same template as the other types. 1 Link to comment Share on other sites More sharing options...
a-ok Posted March 27, 2018 Author Share Posted March 27, 2018 1 hour ago, elabx said: Maybe it's a permission issue in the repeater matrix template used by the repeater matrix field?? Though makes me wonder why it works on Text type because that one uses the same template as the other types. Yeah I thought the same Link to comment Share on other sites More sharing options...
a-ok Posted March 27, 2018 Author Share Posted March 27, 2018 I believe it's to do with the Admin Restrict Branch module... which is still odd that text works but I had to exclude Admin > Repeaters from the Restrict Branch and seems to work... 2 Link to comment Share on other sites More sharing options...
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