Permissions and Menus

Results 1 to 2 of 2

Thread: Permissions and Menus

  1. #1
    Join Date
    Dec 1969

    Default Permissions and Menus

    Scenario<BR><BR>Web site with a drop down navigation system, 7 main areas, each area can have 6+ sub sections<BR><BR>Each user may or may NOT have permission to access the main and or some sub sections, so that user should not see that main or sub section in their navigation. <BR><BR>Question<BR>What is the best way to handle this scenario?<BR><BR>I have come up with two solutions.<BR><BR>1) Store the nav bar as text in the db (this is a sql server driven site), update the text when permissions change.<BR><BR>Horrible to write, horrible to implement and what happens when a new area is added and you need to update all the users?<BR><BR>2) Retrieve all the users permissions for all areas in on big stored proc inside a CLASS so that you can access the properties for each area as when you need it and include this in each page<BR><BR>Not quite so horrible, as I am already extracting session information with each page hit from the db anyway so would just need to move this to a class and increase the number of parameters<BR><BR>I am sure that you lot must have come across something like this before so any help, advice, pointers etc. would be appreciated<BR><BR>

  2. #2
    Join Date
    Dec 1969

    Default In the middle...

    (2) to start with. Store the current user&#039;s permissions in an array that you then put in a Session variable.<BR><BR>For (1), sort of: But again, store the text of the NavBar in a Session variable so that you only have to build it one time (rather than in the DB).<BR><BR>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts