Re: not sure how to describe this question...
- From: Dennis <Dennis@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Tue, 6 Jun 2006 17:42:02 -0700
Supporting multiple people responsible for multiple in a database may be
simple to you but not to newbie's like myself. Do you have either a
reference to describe some techniques or an example? Thanks.
--
Dennis in Houston
"GhostInAK" wrote:
Hello mattdaddym@xxxxxxxxx,.
All the other suggestions about database storage are good. A database model
that supports multiple people responsible for multiple entities is a fairly
simple construct.
An aspect that hasnt been addressed is what to do with the data. Newbies
will probably tell you to read the data from the DB on each page load. YUK.
Or they might say read it on the first page load and store the data in session
variable/s. Equally YUK. Look into Forms/Windows Authentication. I can't
remember off the top of my head what the object is, though I think it's Page.Identity.
You populate this at session start.. then you can figure out what the user
is allowed to do by asking Page.identity.InRole (or IsInRoll ).. anyhow..
you get the idea.
Take care,
-Boo
Hi all,
I'm writing an application in asp .net and vb .net. The question I
have just verifies I need to take an official programming course
instead of this "learning on the fly" stuff :)
Here's the situation. I have a site that people will access from
different site codes (site code = building ID). Each user will have a
profile, and permissions to the system based on the profile. The user
currently can only makes changes to the database for the site
code(building) he/she resides in. I'd like to be able to add the
ability to make a user responsible for several sites. So, for now, I
have an sql database with a site_code column that holds the id of the
site for the user.
The issue I am having is how to manage multiple site codes for a user
when I don't know if he/she will be responsible for 1,2,3,4, or more
sites. Here is what makes sense to me, and I appreciate any input on
this.
I should be able to store the one or more site codes the user has
access to in one database column. Maybe delimited by spaces or commas
or I don't know.
When I load these site codes, should I use some kind of array or
collection? Now we are getting into the asp .net part. I need to store
this information in session so it is available across pages. Eitehr
way, when I get to a routine where I need to check the site codes a
user has permission to, I should be able to do something like:
For each site_code in <something>
'check whatever against the site code and determine what should be
done
Next
Am I making any sense? I am inexperienced with this kind of thing.
Thank you!
- Follow-Ups:
- Re: not sure how to describe this question...
- From: Göran Andersson
- Re: not sure how to describe this question...
- References:
- not sure how to describe this question...
- From: mattdaddym
- Re: not sure how to describe this question...
- From: GhostInAK
- not sure how to describe this question...
- Prev by Date: Re: Failed to decrypt
- Next by Date: Re: Capturing mouse events (Mouse up and down on the desktop)
- Previous by thread: Re: not sure how to describe this question...
- Next by thread: Re: not sure how to describe this question...
- Index(es):
Relevant Pages
|