Assign record to specific user

4 posts by 2 authors in: Forums > CMS Builder
Last Post: January 6, 2022   (RSS)

By andreasml - December 6, 2021

Hi

I would like to let the administrator of a CMSB database, to be able to assign a record from one section to one or more users (chosen from the list of users). This way, when each user is logged in with his personal username/password and opens this section, he/she will be able to see and edit the record(s) that the administrator has assigned for him/her. 

Any ideas on how to do it?

Kind regards,

Andreas Lazaris

By daniel - January 4, 2022

Hi Andreas,

If you're working within the CMSB admin, a functionality close to what you describe is available by default - when editing a record it should show a line at the top that starts with "Created" which lists when the record was created, and who it was created by. Clicking "change" lets you change the creator of that record. A user whose permissions are set to "Author" for a section can only see and modify records that they have created.

The main limitation here is that this cannot be used to assign a record to more than one user.

If being able to assign multiple users is a necessity, that gets into some more complex functionality and depends somewhat on your current user setup. If you can provide some further details, I can describe some options for how to achieve this:

  • Are the users logging into the CMSB admin, or are they logging into front-end pages?
  • Are you using the Website Membership plugin? 
    • If yes, what is the "WSM_ACCOUNTS_TABLE" option set to in the plugin?

Thanks,

Daniel
Technical Lead
interactivetools.com

By andreasml - January 5, 2022

Hi Daniel

Thank you for your reply and your advice. Although yes, being able to assign multiple users is a necessity for my task, I very much appreciate your suggestion on changing user by the "Created" field.

Regarding your questions:

  • "Are the users logging into the CMSB admin, or are they logging into front-end pages?" - Yes the users login into the CMSB
  • "Are you using the Website Membership plugin?"-Yes,  I am.
  • "If yes, what is the "WSM_ACCOUNTS_TABLE" option set to in the plugin?" - Yes, and the "WSM_ACCOUNTS_TABLE" option is set to "accounts"

Regards, 

Andreas