Two Separate User Accounts Section Editors

By Steve99 - April 15, 2011

I have used the CMS Membership Plug-in for the first time on our current web build.

I just have one question:

It is set up to place all users in the main user accounts table. My desire is to use two separate section editors to play off that same table. One of which will be the controller of all regular end users, the other will be the controller of all admin level users.

Edited manually, I currently have each user account ini file set for different required fields since the end users captures more information. This works fine, but I would like to only pull in the Admin records to the Admin User Accounts editor, and the regular end users into the regular User Accounts editor.

I know I could accomplish this by checking to see if "isAdmin" is 1 or 0, I just don't know where in the code or editor options to set this.

Thanks in advance!

Re: [robin] Two Separate User Accounts Section Editors

By Steve99 - April 18, 2011

Hi Robin,
Yes, I have two schema .ini files that pull from the same table. However, both were not created within the CMS. I downloaded the user accounts schema .ini, duplicated and saved it as another file name - then uploaded it into the schema folder. Sounds like my previous post was interpreted as I created both within the CMS, which is not the case... Do you still want me to submit both schema .ini files, or no since they were not both created within the CMS?

I appreciate the link for the free plug-in to hide certain fields. This will prove useful in other builds where there are people of various skill levels.

Since the Website Membership plug-in is set to use the main CMS user accounts table, I have two reasons to want two separate section editors. 1st, I don't want our clients editor staff to be able to view and edit our "super admin" entry within the CMS. 2nd, I have required fields in each .ini file set differently.

My goal was to have the regular website members info be viewable by our clients editor staff in one of the section editors/schema .ini. In the "admin" section editor, my goal was to have it pull only the site administrators - making sure that this one is not viewable through the CMS by anyone but the admins / "Defined CMS Editors".

I know there is the "isAdmin" for web page coding aspects (toggled to 0 or 1 depending what we want to be visable to whom). I'm just not sure how to go about setting something like that in the back end of the CMS to accomplish that type of filtering.

Thank you in advance!

Re: [steve99] Two Separate User Accounts Section Editors

By robin - April 18, 2011

Hey Steve,

I think if you copied and renamed a schema, then you actually have two tables. The CMS would have created a new table with the name of your copied schema.

If you want to try your hand a coding a plugin then yes, the isAdmin variable is what you would use. You can check out the free plugins for examples on how to modify forms.

If you can wait, the best solution for you might be to wait for CMS Builder 2.08 which is in beta right now. It will have the ability to define fields as editable by admins, but not editors.

http://www.interactivetools.com/forum/gforum.cgi?post=87368#87368

Robin
Robin
Programmer
interactivetools.com

Re: [robin] Two Separate User Accounts Section Editors

By Steve99 - April 18, 2011

The CMS actually did not create a new table when I duplicated the schema file manually (verified by checking our database). The CMS actually was using both user account schema .ini files off the same table.

I'm not in a super rush since the individual acting as their main website editor and has access to all CMS areas has IT experience and was told not to touch specific credentials. I just wanted to set it up to be fool proof.

Just to confirm, there is no way within the schema .ini file itself to filter records based on the isAdmin value - correct? And to accomplish this I would need to create my own plug-in.

Thanks again, Robin.

Re: [steve99] Two Separate User Accounts Section Editors

By robin - April 18, 2011

Hey Steve,

Yes that's right, you cant filter records in a schema file. The schema file is not referenced when you view a record, you would need a plugin. The new access features in 2.08 sounds like exactly what you need though.

Thanks,
Robin
Robin
Programmer
interactivetools.com

Re: [robin] Two Separate User Accounts Section Editors

By Steve99 - April 18, 2011

Hey Robin,
Okay, perfect. I'll just hang tight for version 2.08 to be out of beta and update this installation instance.

Thank you for your assistance.