close ad
Databridge V2 with MySQLi support IS Now Available!
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Rules Manager & Page Access

Thread began 5/05/2011 9:33 pm by Lon Winters | Last modified 5/06/2011 1:38 pm by Jason Byrnes | 1357 views | 7 replies |

Lon WintersBeta Tester

Rules Manager & Page Access

I just got done setting up rules, permissions and batch processing various folders and files on a site I'm developing. This is only the second time I've had the change to do this, and I just want to say that it works great.

It's the icing on the cake, turning a pretty good web application into a complete and professional package.

Thanks Web Assist!

Sign in to reply to this post

Lon WintersBeta Tester

Well, I jinxed myself. I am having trouble with a group rule. Here's the story.

I have two Access levels in the database, 1 and 2. 1 is for regular users logged in, 2 is for Admins. I created a rule for each: Agent allow access if equals 1. Admin allow access if equals 2. I have two test users in the database, one for each level.

I applied the first rule to the page, allow if rule passes. Tested with that user account, works. Tested with a direct link to the page without logging in, works, redirect to correct login page.

I then changed the rule for the second level access, Admin, tested as above, and it works.

Now, I create a group that combines both, and a third rule based on that group. Everything is to allow access, not restrict. I then apply the new, third rule to the page - doesn't work, rule does not pass and page redirects. For either account.

So I'm stumped. This is in ASP, I did the exact same thing on a PHP site and it worked. There are no blank entries anywhere. Either I'm not setting up the group correctly, or there is something wrong with the code being generated in the supporting files. I'll attach the HelperGroupRules file. The page I'm applying the rule to is correct with the proper includes and code to redirect if the rule does not pass.

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

Jason ByrnesWebAssist

The values you entered for the AdminAgent group are "Admin" and "Agent", they should be "1" and "2" instead.

Sign in to reply to this post

Lon WintersBeta Tester

I must have uploaded the file after I switched the Access Level to text values, it was previously set at 1 and 2.

It works fine with text values, and only the single rules worked with numerical. I even tried changing cStr to cInt before each session variable in the Rules file.

I'll just chalk it up to good ole 'classic' ASP, I've found it to be unpredictable at best and IIS installations from host to host vary. This current hosting provider actually made me make my own web.config file just so it could diplay error messages.

Sign in to reply to this post

Jason ByrnesWebAssist

Hmmm, on the failure page, write the session value:

Access Level: "<%= Session("accessLevel") %>"

that will give us a direction to troubleshoot.

Sign in to reply to this post

Lon WintersBeta Tester

Ok, I converted back to numerical access levels and created a fail page to display the level and User ID - for both accounts it came out with the proper ID level.

But - there's a but here, going back to your previous response. I compared the Rules file that I uploaded with the current one and they are the same, so I misunderstood when you said Agent and Admin should be 1 and 2.

In the Edit Access Group dialog, it says "...Click Add to insert a new member into the group; Select a member to modify its value..."

So, I entered the two members using the name of the rules, not the value for the rules. Is this where I should have entered 1 and 2? I guess the instructions make sense if the member value is in text, but it's a little confusing when they're numbers. I'll give it a try.

Sign in to reply to this post

Lon WintersBeta Tester

Yep that was it. Is it possible that the dialog wasn't displaying everything? It just seems that in every other instance where a rule is created by entering the database value, there's the compare to and the operator and the text field. All this showed is a plain text field.

Anyway, I stand by my original post - it's still a great tool. One last question - I went back to text values, it just seems overall more simple. Is there a case to be made by using numeric values, possibly when the site requires a more complex rule structure, where the math operators would be better?

Sign in to reply to this post

Jason ByrnesWebAssist

really the argument for using numeric values for the user group is mainly for database storage concerns.

It tales more storage space to store a string in the database than it does to store a number.


If you dont expect your database to be to large and are more comfortable with using strings, then thats fine.

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