Re: Determining Membership in Role Chains
From: BP Margolin (bpmargo@attglobal.net)
Date: 08/24/02
- Next message: BP Margolin: "Re: Login with no Fixed Server Role and DB Role can stop SQL Agent Service?"
- Previous message: Richard Waymire [MS]: "Re: Login with no Fixed Server Role and DB Role can stop SQL Agent Service?"
- In reply to: Geoffrey Barnes: "Determining Membership in Role Chains"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
From: "BP Margolin" <bpmargo@attglobal.net> Date: Sat, 24 Aug 2002 15:12:57 -0400
Geoffrey,
I just tested what you said, on SQL Server 2000 w/SP2, and I seem to be
getting different results than you.
I created two roles: Salesmen and SalesManager.
I added a SQL Server login ("test") to the Salesmen role.
I added the Salesmen role as a member to the SalesManager role.
When I login using the "test" login and query Is_Member for either the
Salesmen or the SalesManager role, I get a 1.
-------------------------------------------
BP Margolin
Please reply only to the newsgroups.
When posting, inclusion of SQL (CREATE TABLE ..., INSERT ..., etc.) which
can be cut and pasted into Query Analyzer is appreciated.
"Geoffrey Barnes" <spambuster@earthlink.net> wrote in message
news:xTK99.4153$ld4.391136@newsread2.prod.itd.earthlink.net...
> The security model for one of my client's database has a lot of roles that
> are members of other roles. For example, they have two roles called
> Salesmen and a SalesManager, with the SalesManager role being a member of
> the Salesmen. That way, all SalesManager's can do everything that the
> Salesmen can do, along with whatever additional permissions are granted
> directly to the SalesManager role.
>
> I thought this model was fairly clever until I tried to apply IS_MEMBER to
> it. IS_MEMBER (and sp_helprolemember, for that matter) only report direct
> role membership for the current user. In other words, when a SalesManager
> is logged on, IS_MEMBER('SalesManger') will return a 1, but
> IS_MEMBER('Salesmen') will not, even though all SalesManger's are members
of
> Salesmen.
>
> I know I could get around this by writing my own procedure and using
cursors
> to step through the sys tables, but I am wondering whether there is
already
> a ready-made solution out there.
>
> Thanks in advance.
>
>
- Next message: BP Margolin: "Re: Login with no Fixed Server Role and DB Role can stop SQL Agent Service?"
- Previous message: Richard Waymire [MS]: "Re: Login with no Fixed Server Role and DB Role can stop SQL Agent Service?"
- In reply to: Geoffrey Barnes: "Determining Membership in Role Chains"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Relevant Pages
|