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

MySQLi Restrict Acces To Page - level user

Thread began 8/25/2021 5:54 am by fabiosaggioro438787 | Last modified 9/10/2021 2:54 pm by Ray Borduin | 27 views | 5 replies |

fabiosaggioro438787

MySQLi Restrict Acces To Page - user level

Hello, I have some pages for which I would like to limit access based on the type of user for example administrator, customer, employee etc .. I see in Server Behavior, the "MySQLi Restrict Access To Page" function. Is this the right function? If so, what should I do? Thank you.

Sign in to reply to this post

Ray BorduinWebAssist

You can save the user type into the session with the user authentication server behavior on your login page. Then create rules for each type of user with WebAssist->Security Assist->Manage Site Access->Access Rules Manager...

Once the rules are created for each user type, then you can use the Server Behavior: WebAsssist->Security Assist->Secure Page

Sign in to reply to this post
Did this help? Tips are appreciated...

fabiosaggioro438787

Originally Said By: Ray Borduin
  You can save the user type into the session with the user authentication server behavior on your login page. Then create rules for each type of user with WebAssist->Security Assist->Manage Site Access->Access Rules Manager...

Once the rules are created for each user type, then you can use the Server Behavior: WebAsssist->Security Assist->Secure Page  
Sign in to reply to this post

Ray BorduinWebAssist

You can save a session variable with the user access level from the login page... By default it will use the same name as the column in the database, so let's assume it is "UserAccess" although you can set it to whatever you want.

Then you can create rules for each access level. One rule might be:
"Admin" and it might be set to "Allow If Session variable "UserAccess" equal to 4

You can then use that rule to restrict access to admin users only, Hopefully that helps.

Sign in to reply to this post
Did this help? Tips are appreciated...

fabiosaggioro438787

Originally Said By: Ray Borduin
  You can save a session variable with the user access level from the login page... By default it will use the same name as the column in the database, so let's assume it is "UserAccess" although you can set it to whatever you want.

Then you can create rules for each access level. One rule might be:
"Admin" and it might be set to "Allow If Session variable "UserAccess" equal to 4

You can then use that rule to restrict access to admin users only, Hopefully that helps.  
Sign in to reply to this post

Ray BorduinWebAssist

No, you can only do one restrict access server behavior per page. But you can can do a rule that checks more than one condition to accomplish what you need. Usually when you create an "admin" rule a "not admin" rule is automatically created. You could also use "restrict if" instead of "allow if" to create a second rule that is the inverse of the first.

Sign in to reply to this post
Did this help? Tips are appreciated...

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