SQL Server Role Provider

This is a discussion on "SQL Server Role Provider" within the Databases section. This forum, and the thread "SQL Server Role Provider are both part of the Program Your Website category.



 Subscribe in a reader

Go Back   Webforumz.com > Main Forums > Program Your Website > Databases

Notices


Reply
 
LinkBack Thread Tools
  #1  
Old Oct 4th, 2007, 18:11
New Member
Join Date: Nov 2005
Location: Greencastle, IN
Age: 26
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
SQL Server Role Provider

I'm trying to use SQL Server's role provider, but I'm not sure if I'm using it in the most efficient way. Instead of haivng just some roles for the site, and assigning the users to the roles, I am trying to write a program for several organizations to assign their member's to roles.

A little background: My site has individuals and companies creating accounts. An individual account would be for a standard employee, and a company account would be for a manager, like in HR or Financing. An individual can be employed by multiple companies, and obviously a company can have multiple employees, as well as multiple company accounts for that company.

So...

Since I'm trying to just use what SQL Server provides out of the box, I made it so when a role is created for an company it is created with a RoleName that's something like "123456|Administrator" where "123456" is the company's account ID. There's only about 8 different roles, but the way I have it, each company will have 8, and the rules for each role will be the same for each company.

It seems kind of redundant, but I couldn't think of any other way to be able to differentiate between the roles that an individual would have with one company and the ones he or she would have with another company. I tried adding a column for the company ID to the aspnet_UsersInRoles table, but I don't know an easy way to be able to access that ID.

Also, after I get the roles working correctly, I am going to start working on allowing the companies to create work groups for their employees to be assigned to. I thought a quick way to do that would be to just expand on what I was doing with the roles, and have actual roles named "123456|role|Administrator" and work groups named "123456|workgroup|Team A" in the aspnet_Roles table as well. Is that bad?

Thanks.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote

  #2  
Old Oct 5th, 2007, 05:34
Highly Reputable Member
Join Date: Apr 2007
Location: Willich, Germany
Age: 20
Posts: 593
Blog Entries: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Re: SQL Server Role Provider

Well, if it works for you, then, why not.

But I would consider making your own table: keep all the fields that the Role Provider needs, but then add some of your own. I think that could be a much more flexible solution.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
PHP & MySQL Web Dev Role!! Kelly Brothers Job Opportunities 1 Mar 26th, 2008 12:07
Looking for sub domain provider! kelsey Hosting & Domains 9 Nov 2nd, 2007 12:03
Choosing a service provider WebMachine Hosting & Domains 8 Sep 19th, 2007 12:30
US provider or not...? rima Hosting & Domains 5 Aug 16th, 2006 15:00
Junior Designer Role sip1976 Job Opportunities 0 Nov 11th, 2005 14:44


All times are GMT. The time now is 20:06.


Powered by vBulletin®
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0 RC8
© 2003-2008 Webforumz.com : All Rights Reserved

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42