close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Problems setting access levels

Thread began 10/25/2011 1:19 am by jvorzimer358609 | Last modified 10/25/2011 10:26 am by Jason Byrnes | 1085 views | 2 replies |

jvorzimer358609

Problems setting access levels

I need to set access levels based on the following values:

<?php echo $_SESSION['UserLevel']; ?> - check for membership registration

<?php echo $_SESSION['OrderSubscLevel']; ?> - what level subscription is current

<?php echo $_SESSION['SubscActive']; ?> - has the subscription run out or is active

I have written a script that sets the additional 2 SESSION variables because they come from orders table used by the cart system. I have tested the script and at login the values are available.

The problem that I am having is in getting the different user levels to interact properly.

There are 5 levels of interactivity within the site.
1- non member - values for this user are
<?php echo $_SESSION['UserLevel']; ?> - 0
<?php echo $_SESSION['OrderSubscLevel']; ?> - 0
<?php echo $_SESSION['SubscActive']; ?> - 0

2- member (free service) - user level 1
<?php echo $_SESSION['UserLevel']; ?> - 1
<?php echo $_SESSION['OrderSubscLevel']; ?> - 0
<?php echo $_SESSION['SubscActive']; ?> - 0

3- first level subscription (paid service) -
<?php echo $_SESSION['UserLevel']; ?> - 1
<?php echo $_SESSION['OrderSubscLevel']; ?> - 2
<?php echo $_SESSION['SubscActive']; ?> - 1

4- second level subscription
<?php echo $_SESSION['UserLevel']; ?> - 1
<?php echo $_SESSION['OrderSubscLevel']; ?> - 3
<?php echo $_SESSION['SubscActive']; ?> - 1

5- third level subscription
<?php echo $_SESSION['UserLevel']; ?> - 1
<?php echo $_SESSION['OrderSubscLevel']; ?> - 4
<?php echo $_SESSION['SubscActive']; ?> - 1

Content available to each successive level still needs to be open to the higher levels.

I just don't seem to find any combination of these that will work. It seems like as soon as any "allow" criteria is hit all the others are just ignored. I need all 3 criteria to be met before allowing access.

I have tried to set groups for this but when I try to define a group based on either of the two variables I set in my script Security Assist Groups Manager gives this error:
uilnitialize error.
Error: The object is not currently contained in a document

Sign in to reply to this post

jvorzimer358609

Well, it's almost 5am and I am going to have to go to bed. Been up trying to figure this out and it just doesn't make any sense at all.

I have enclosed a couple of images of screen caps showing the simplest rule I have setup and the script I ran and results I got to be sure that the values for the security checks are available in the SESSION array.

When I put this rule on a page I can no longer view the page whether I am logged in or not.

As you can see, when I am logged in the UserLevel SESION variable is currently 1. The rule is set to allow access if that variable is 1 but I still get redirected to the fail page.

This first 2 variables (SecurityAssist_UserID and UserLevel) are ones that are available directly through the settings in SA2. The other 2 variables are the ones I generated by pulling values from the orders tables and doing my calculations to check for the active subscription and level of access. I have also included the login.php file I altered and the file containing the function call I used to generate these variables.

Attached Files
RulesSettings.zip
SA2_Rules.zip
SESSION_Variables.zip
Sign in to reply to this post

Jason ByrnesWebAssist

I have created a support ticket so we can look into this issue further.

To view and edit your support ticket, please log into your support history:
supporthistory.php

If anyone else is experiencing this same issue, please append to this thread.

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...