Web Wiz - Green Windows Web Hosting

  New Posts New Posts RSS Feed - access levels
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

access levels

 Post Reply Post Reply
Author
yessir View Drop Down
Newbie
Newbie


Joined: 02 October 2003
Status: Offline
Points: 9
Post Options Post Options   Thanks (0) Thanks(0)   Quote yessir Quote  Post ReplyReply Direct Link To This Post Topic: access levels
    Posted: 08 October 2003 at 8:46am

I am developing an ASP site which has an ACCESS backend.  I am going to have users login and based on the level of access given to them by the admin the should only be able to access certain parts of a page.

=====================
3 levels:
=====================
ADMIN :: total access
update :: enter data/edit
read :: read ONLY access

I am going to have a menu which must be accessible based on the login level, the menu entry then goes to a listing based on the menu item selected and level access.

============================
The Listing page has 4 options on it. (all are html links)
============================
Add     (by itself)
View   (in listing as a column)
Edit     (in listing as a column)
Delete (in listing as a column)


I  wish to have
admins with no restrictions
update to see add/view/edit
read view only

So the question is HOW do i restrict access/visibility of the html links to the add(on its own) and to the view/edit/delete(parts of the listing as the first 3 columns) all based on the users login and assigned accessability?

This is VERY important and I need to know SOON
Please helP

thanks in advance
~

Back to Top
fernan82 View Drop Down
Mod Builder Group
Mod Builder Group
Avatar

Joined: 17 November 2002
Location: United States
Status: Offline
Points: 362
Post Options Post Options   Thanks (0) Thanks(0)   Quote fernan82 Quote  Post ReplyReply Direct Link To This Post Posted: 08 October 2003 at 9:45am

Assuming you use a numeric value for the groups I would make:

Read = 1
Update = 2
Admin = 3

The code for the menu would look like this:

If intAccessLevel => 2 Then Response.Write("<a href=""http://add.asp"">Add</a>")

If intAccessLevel => 1 Then Response.Write("<a href=""http://view.asp"">Vuiew</a>")

If intAccessLevel => 2 Then Response.Write("<a href=""http://edit.asp"">Edit</a>")

If intAccessLevel => 2 Then Response.Write("<a heref=""http://delete.asp"">Delete</a>")

 

 

FeRnAN
Back to Top
l_baltodano View Drop Down
Mod Builder Group
Mod Builder Group
Avatar

Joined: 09 June 2003
Location: Nicaragua
Status: Offline
Points: 39
Post Options Post Options   Thanks (0) Thanks(0)   Quote l_baltodano Quote  Post ReplyReply Direct Link To This Post Posted: 08 October 2003 at 12:14pm

hi fernan82.. i got that part.. plz. excuse me if i ask about this topic too.. but i´m in the same hurry.

Well if i assign an account level in the database, then i just need to write that value in a cokkie right?.. so, when the user comeback the system will check the cache to see what´s his level and based on that it will display the appropiate value right?

Just one more question.. do i need to check the user level in all my ".asp" pages?.

Thank you very much!

Back to Top
yessir View Drop Down
Newbie
Newbie


Joined: 02 October 2003
Status: Offline
Points: 9
Post Options Post Options   Thanks (0) Thanks(0)   Quote yessir Quote  Post ReplyReply Direct Link To This Post Posted: 08 October 2003 at 12:24pm

i wouldn;t cache anything, at the end of a session remove teh cookie/cache if you do.

 

And yes in all your pages you have to check!

Back to Top
vshriniwasan View Drop Down
Groupie
Groupie
Avatar

Joined: 17 December 2001
Location: United States
Status: Offline
Points: 63
Post Options Post Options   Thanks (0) Thanks(0)   Quote vshriniwasan Quote  Post ReplyReply Direct Link To This Post Posted: 10 October 2003 at 4:10pm
I did similar item few weeks ago. I simply created a small Function and passed level and module value through it. Function(level,mod). Using that I can specifically display what options I want to give to the user, and depending on the Mod, you can show the options accordingly. By doing this, I didn't have to recreate the code in everypage, looking for what module what user is accessing, and what level access he has. By using the same function over and over again, it will make it easy for you to control this process.
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.08
Copyright ©2001-2026 Web Wiz Ltd.


Become a Fan on Facebook Follow us on X Connect with us on LinkedIn Web Wiz Blogs
About Web Wiz | Contact Web Wiz | Terms & Conditions | Cookies | Privacy Notice

Web Wiz is the trading name of Web Wiz Ltd. Company registration No. 05977755. Registered in England and Wales.
Registered office: Web Wiz Ltd, Unit 18, The Glenmore Centre, Fancy Road, Poole, Dorset, BH12 4FB, UK.

Prices exclude VAT at 20% unless otherwise stated. VAT No. GB988999105 - $, € prices shown as a guideline only.

Copyright ©2001-2026 Web Wiz Ltd. All rights reserved.