Newbie UserID question

J

JJ

I wanted to know if anyone could tell me if I am going about this the right
way:

I have a 'project' database table (sql 2005). I want to allow certain users
to access certain projects. Each user will have an access level assigned
(e.g. admin, manager).

I have main project table (project title, description etc) and I have added
a 'Project_Users' table with the following columns:

ProjectUserID int
ProjectID int
UserID uniqueidentifier
ProjectAdminLevel int

I chose to use UserID instead of UserName as I was worried that if a user
with admin priviledges was deleted, a new user could choose the same
username and get admin access to a project. I assume that a new user
couldn't have the same UserID as an old one (? or should I store both userID
and userName?).

I am not sure how to get hold of a userID from a profile and also how to
declare the datatype as uniqueidentifier. More to the point I am not even
sure this is the right way of approaching this problem.

Could anyone give me any pointers?

Many thanks,
JJ
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,770
Messages
2,569,584
Members
45,075
Latest member
MakersCBDBloodSupport

Latest Threads

Top