close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

access denied (error message) using show region behaviour

Thread began 11/29/2012 7:03 am by s.joiner74419001 | Last modified 12/04/2012 7:37 am by s.joiner74419001 | 3455 views | 8 replies |

s.joiner74419001

access denied (error message) using show region behaviour

I have created a Double Opt In Registration System for a Property Management Web-site as follows: ( I have had numerous discussions with Jason on this ):

- The user completes registration form (which contains a menu list where they select their block/estate.
- Once they have verified their details they will have access to the secure area home page. which displays the list of properties. But they will not have access to the pages available from this block/estate list until the site admin manually enters an access code into the database table that's relevant to the block/estate they selected when they registered. ( the 'Register Confirm' page tells the user they have to wait for 24 hours before they can access their block/estates secure area )

I would like an error messages to appear when the user tries to enter a block/estates secure area depending on their status. as follows:

If they try to select a block/estate that is not theirs..

Or if they try to enter their block/estates secure area before we enter their access code into the database..

Either of the above they receive this message.

"!Access denied. You do not have permission to enter this secure area"


I realise I need to use the show region behaviour for this but thats all I do know. I am unsure on what else needs to be done for this to be added.

Please help!

Sign in to reply to this post

Jason ByrnesWebAssist

add the access denied message to you page, select in design view, the add the security Assist Show region behavior, from the access rule, select the Not Logged into <your users table> rule

Sign in to reply to this post

s.joiner74419001

access denied (error message) using show region behaviour

I don't think what you've suggested is going to work Jason. If you look at the screen shot I have attached. This is the page that all users will be directed to from login. this is where they select their block/estate from the list.

So for example if a user logs in, and they are a resident form Onyx Mews. ( incidentally admin would have manually entered the access code into the 'AccessCode' table column' after the user verified its details.)

If this user selects any other block/estate than Onyx Mews, then the error message appears.

At the moment. I have an access rule for each block/estate which compares the Session Variable 'AccessCode' to the block/estates Access Code.( See attached screen shots ) If the user selects the wrong estate they are re-directed to an 'Access Denied' page.

I would rather just have an error message appear than direct to a page that simply says '!Access Denied ........'

Your probably getting fed up with me by now Jason... Appologies.

Sign in to reply to this post

Jason ByrnesWebAssist

well, rather than adding the access restriction behavior to the page, use the show region behavior


select the region that should show if access is granted, and add a show region behavior, use the rule you are currently using thr for the Access restriction.

add the error message, and add a second show region, use the NOT <rule name> condition

Sign in to reply to this post

s.joiner74419001

access denied (error message) using show region behaviour

I'm sorry Jason, I don't quite understand what you are suggesting here.

You say 'Select the region that should show if access is granted, and add a show region behaviour' ... What would this region be? .. How does this apply to a link that is selected? If they have access the link directs them to another page.. If they don't the error message appears.

All links should be visible from this page because the home page will hold information relevant to all blocks/estates. If I apply a show region to each link with its own access rule they will disappear depending on who is logging in. Plus I can't see how I can trigger the error message when a link is clicked.

Sign in to reply to this post

Jason ByrnesWebAssist

you add the show region to the page the link goes to.

add a show region behavior around the main content of the page to show it if they DO have access


add a second show region with the error message as alternative content if they DO NOT have access

Sign in to reply to this post

s.joiner74419001

you add the show region to the page the link goes to.

Aaaaah Ok! That makes more sense now. I'll give it a go!

Many thanks Jason!

Sign in to reply to this post

s.joiner74419001

user-confirm page: message not showing!

Jason, before I try what you have suggested. I have a problem with the user-confirm page...

Once a user registers, they are sent the verify email as normal. When the user clicks on the link in the email, they are sent to the user-confirm page but the verified message is not being displayed. I have checked the database and the details are verified and they can login.

Incidentally I have a navigation list at the top of my site template for 'Login / forgot password / Logout / Not registered' links. These are all using Show regions using the 'logged in to users' and 'Not logged in to users' Session bindings to only show the relevant links. Is this effecting the messages on the user-confirm page?

Sign in to reply to this post

s.joiner74419001

It's ok Jason, the php line for the helper.php file was missing.

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