Web Design and Development Forums

SQL Server Role Provider

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


Go Back   Webforumz.com > Databases > MSSQL & Access

Welcome to Webforumz.com.
Register Now Register now!

Reply
 
LinkBack Thread Tools Rate Thread
Old Oct 4th, 2007, 18:11   #1 (permalink)
New Member
 
Join Date: Nov 2005
Location: Greencastle, IN
Age: 25
Posts: 5
Send a message via AIM to lucidspoon
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.
lucidspoon is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Old Oct 5th, 2007, 05:34   #2 (permalink)
 
c010depunkk's Avatar
 
Join Date: Apr 2007
Location: Willich, Germany
Age: 20
Posts: 612
Blog Entries: 2
Send a message via MSN to c010depunkk
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.
__________________
Web design is the creation of digital environments that facilitate and encourage human activity; reflect or adapt to individual voices and content; and change gracefully over time while always retaining their identity.

~ www.c010depunkk.com ~ the hang-out of a web developer

c010depunkk is offline  
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
Rate This Thread
Rate This Thread:

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
Looking for sub domain provider! kelsey Hosting & Domains 9 Nov 2nd, 2007 12:03
Flash Developer Role dean1 Job Opportunities 0 Apr 18th, 2007 10:11
US provider or not...? rima Hosting & Domains 5 Aug 16th, 2006 15:00
Strange CSS role over problem Joolsd186 CSS Forum 5 Aug 9th, 2006 14:50
Junior Designer Role sip1976 Job Opportunities 0 Nov 11th, 2005 14:44



Latest Updates

All Points SEO Security Advisory - CHECK YOUR SITE NOW!

Creative Coding :: February 2008

Webforumz is sponsored by: WESH UK Web Hosting
All times are GMT. The time now is 07:07.

Sleep Study Scoring :: Free Bet :: Website Templates :: Online Betting :: Bookmakers :: Funny Quotes :: Internet Recruitment Software :: Microsoft CRM Experts :: Online Casino :: Decorated Christmas Trees :: Midwife Forums :: Football Betting :: Ecommerce Software :: Web Hosting :: Football Stats :: Dry Cleaning Collection :: xtreme wales - extreme clothing :: Apuestas :: Sharepoint Consultants :: Website Optimisation :: Office Clearance London :: Sharepoint Experts :: Sports Betting :: Casino :: Website Templates :: Web Design Development India :: Online Gambling

Powered by: vBulletin Version 3.7, Copyright ©2000 - 2008, Jelsoft Enterprises Limited.
© 2003-2008 Webforumz.com : All Rights Reserved
Search Engine Friendly URLs by vBSEO 3.2.0 RC6


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 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59