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