Jump to content

User access management


VeiJari
 Share

Recommended Posts

Hi, this is the first we are trying to make a page that has only one type of user that has access to every page. 

The other users should only have a given access to specific pages, not to the whole template.

My structure

-Field
 -Organisation
	-Project
		-Report

I want that the "measurer" role only has access to "project x" and it's children, but no view access to every project, organisation or field. I've tried to do this with https://modules.processwire.com/modules/page-edit-per-user/ but it still needs a view access to the whole tree to see the "project x" page. Or is there something I haven't figured out?

Maybe I have to make it via the API: a select field in the "organisation" template where the admins could add the users and then I use hook to update the privileges?

Have you done something like this and how did you accomplish it?

Any help would be appreciated.

 

Link to comment
Share on other sites

On 9/18/2020 at 12:52 PM, Ivan Gretsky said:

If it is only one project per user, you could use this module. If you need to grant a user access to 2 or more branches, you probably need to hide the tree of pages to that user and display accessible pages with a custom module.

I hope I understood your question properly)

I want to achieve that you can give a as many projects you want to a user. But that in $pages->find() the user should see only the pageobjects it has permissions to. I've tried to find how Processwire checks page specific access, but I haven't found it yet. I've tried with $permissions->get() but I only get nullpages, and not the page I've given it access to in the module.

 

I'll keep looking for it in the API-documentation.

Thanks for the help anyway, if you know what API-call I should use, It would be nice.

Link to comment
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
 Share

×
×
  • Create New...