users and roles

F

Francis Reed

Hi

I haven a question concerning roles and membership in asp.net 2.0. I work
for an online university, and we would like to implement role based security
for our portal. Currently our university has 11 courses, which fall in 5
semesters, and each course is then subdivived into approx 5 or more
groups, and in each group we have teachers, students, teacherAssistants. A
quick calculation can approximate that we have to create about 825 roles.
(11 courses * 5 Semesters * 5 groups * 3 userTypes = 825 roles)


Of course, this is only an estimate, and we are probably going to need more
userTypes(students, teachers, teacherAssistants, headTeacherAssistant), and
create more courses(math, french,computerScience). The number of semester
might also increase if we decided to make the length of a semester shorter.
To solved this, I proposed the following idea, and would like your opinion
on this approach to see if it's viable in terms of maintenance, and fine
control over security. Each roles would have the following naming
convention.


roleName -> "<course><semester><groupName><userType>"


Here is an example of 12 roles that would be created to satisfy 2 courses
all in Fall with 2 groups in each course.


ChemistryFallGroup1Student
ChemistryFallGroup1Teacher
ChemistryFallGroup1TeacherAssistant


ChemistryFallGroup2Student
ChemistryFallGroup2Teacher
ChemistryFallGroup2TeacherAssistant


ReligionFallGroup1Student
ReligionFallGroup1Teacher
ReligionFallGroup1TeacherAssistant


ReligionFallGroup2Student
ReligionFallGroup2Teacher
ReligionFallGroup2TeacherAssistant


My quesiton is the following, Is this a bad way to organize roles for this
type of portal. Also, is there an alternative way to do this do this kind of
roles based security. By alternative, I mean creating a custom RoleProvider,
and adding a groupID column. That way in the aspnet_UsersInRoles table we
would have the following columns.
(UserId | RoleId | GroupID). Is this second approach going to lead to a lot
of problems down the road, and will it require a lot of work? Will this mean
we would have to rewrite a lot of controls that work with the
SqlRoleProvider, and SqlMembershipProvider. I would appreciate any feedback,
or advice. Also, if you can suggest which approach is better and why, or
suggest alternatives ways. Thank you for the time you have given this post,
and I hope to hear from you soon.


Francis
 

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

Forum statistics

Threads
473,774
Messages
2,569,596
Members
45,143
Latest member
SterlingLa
Top