Jump to content

Users & Roles questions


Marty Walker
 Share

Recommended Posts

Hi all,

I have a question or two with regards to Users & Roles. I haven't been anywhere near that part of PW so I'm not sure if this is possible or not for this site I'm looking at building.

  1. Can I import a lot of users (say 400) into the system?
  2. Can I assign each user to their own page (essentially a profile page with a dozen images) without them being able to see any other page with the PW admin?
  3. I noticed in the roadmap that for PW 2.3 there may be forms for the front end. Will that include the ability to edit pages?

Thanks & regards

Marty

  • Like 1
Link to comment
Share on other sites

Some interesting questions I also have been thinking about from time to time. I know that much:

  1. Importing 400+ users shouldn’t be a problem, as the users in the end are pages with templates. And there is a module for importing a page structure from csv files.
  2. Assigning a part of the page tree per se to a user should be easy. You could define user-specific home pages with a template that uses a page reference field pointing to the user’s account page. But I don’t think, there is a way to just show the part of the page tree relevant for the user in admin, without a customized module for the page section in backend.
  3. As far as I know, the fronted module for forms would just create the forms from a list of defined input fields. What you do with the data submitted to the page defined in the form’s action attribute, is your decision. Creating forms from the field definition of a page’s template and modifying the page’s field values afterwards via API shouldn’t be that hard to achieve. Maybe you also could access the original backend page edit process from your page’s template to save the edits.

But I guess, ryan and the other’s will have more information on this to share. ;)

  • Like 1
Link to comment
Share on other sites

I agree with everything that Oliver said.

1. Importing should be no problem.

2. Currently you can't do exactly what you've mentioned in #2 without getting into some custom module code. Depending on the scope of what you want to do, I would probably suggest building a front-end to do what you want, and use ProcessWire for it's API to manage the data and users. Since your access needs fall outside of the typical role-based situation, you may want to just name the pages they can edit to be the same as their user ID or user name and then perform your access check at the top of the template file. Basically checking that the page name is the same as the user name before you let them view and/or modify it.

3. This is not planned for the form builder. Though Oliver is correct that you can do this now at the API level.

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

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...