close ad
Install the LAtest Updates to Work with CC 2017 and CC 2018
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Adding additional user levels

Thread began 6/09/2013 3:03 pm by CraigR | Last modified 6/10/2013 2:59 pm by Jason Byrnes | 428 views | 5 replies |

CraigRBeta Tester

Adding additional user levels

Further to a question I asked in another thread, I am adding a level of complexity to my site security, and its not quite working.
I have modified the users_login.php page to take the user data from a members table and added a couple of new session variables to allow for the new user levels I have created.
(I have left the super administrator logic in place, and the wa_users table is still accessed for this role).
Heres my security logic...
User Levels are
Member
Administrator
Group Administrator
Super Administrator

Essentially, the Super Admin is the same as in the PowerCMS setup, and Administrator is analogous to the Admnistrator role from PowerCMS.
I have a users table with a column, userLevel, (Integer) which is 0 for Group admins, 1 for Admins and 2 for Members
I set up the access rules manager so that
all 4 user levels (userLevel = 0, 1 and 2) and SuperAdmin are able to access Members Pages
3 user levels (userLevel = 0 and 1) and SuperAdmin are able to access Administrators Pages
2 user levels (userLevel = 0) and SuperAdmin are able to access Group Administrators Pages
SuperAdmin only are able to access Super Administrators Pages (& regions).

- Is this the correct way of doing it ?

I thought I had this working ok, but am getting anomalous results when trying to log in as different users.
I am planning that each user level is potentially redirected to a different page on successful login.
Please find attached, a copy of my users_login.php page

Attached Files
users_login.zip
Sign in to reply to this post

Jason ByrnesWebAssist

yes, it looks like you have the login page se
t up correctly for this.

where you say:

  I thought I had this working ok, but am getting anomalous results when trying to log in as different users.  



can you give more details on what you mena, also if you include a copy of the
/webassist/security_assist/helpergrouprules.php

file, that would be helpful.

Sign in to reply to this post

CraigRBeta Tester

Thanks Jason, glad I'm roughly on the right track

The issue I seem to be having is with the redirect on login, which is lines 59-70 on the page i provided earlier

So for example,

If a member is logged in, they go back to the site home page, (but with the member's navigation)
If an admin is logged in, they should go the the admin/events/event.php page (as I don't want the normal admins to edit the CMS content)
if a groupadmin or superadmin is logged in, they should go the the admin/index.php

requested file attached

Sign in to reply to this post

Jason ByrnesWebAssist

Originally Said By: CraigR
  Thanks Jason, glad I'm roughly on the right track

The issue I seem to be having is with the redirect on login, which is lines 59-70 on the page i provided earlier

So for example,

If a member is logged in, they go back to the site home page, (but with the member's navigation)
If an admin is logged in, they should go the the admin/events/event.php page (as I don't want the normal admins to edit the CMS content)
if a groupadmin or superadmin is logged in, they should go the the admin/index.php

requested file attached  
Sign in to reply to this post

CraigRBeta Tester

reply to pm

skype craig.rushforth4

available now for the next hour or so

Sign in to reply to this post

Jason ByrnesWebAssist

Originally Said By: CraigR
  reply to pm


available now for the next hour or so  
Sign in to reply to this post

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question

Content

rating

Layout

rating

Ease of use

rating

security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...