Re: xml based AzMan and ActiveDirectory
From: A (a_at_a.com)
Date: 09/15/05
- Previous message: Nicole Calinoiu: "Re: Strong Names Secure???"
- In reply to: Dominick Baier [DevelopMentor]: "Re: xml based AzMan and ActiveDirectory"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Date: Thu, 15 Sep 2005 17:19:12 -0400
Thank you
"Dominick Baier [DevelopMentor]" <dbaier@pleasepleasenospamdevelop.com>
wrote in message news:42565460e2c928c78845f6c43b48@news.microsoft.com...
> Hello A,
>
> i used the following code
>
> private string[] getRoles(IAzClientContext context)
> {
> object[] a;
> try
> {
> a = (object[]) context.GetRoles("");
> }
> catch (COMException ex)
> {
> throw new AzMethodException(ex, "IAzClientContext.GetRoles");
> }
> string[] roles = new string[a.Length];
> Array.Copy(a, roles, a.Length);
> return roles;
> }
>
> i implemented a AzManPrincipal - and the code you see is part of the
> IPrincipal.IsInRole method
>
> you can read more here, too:
> http://www.leastprivilege.com/SearchView.aspx?q=azman
>
> ---------------------------------------
> Dominick Baier - DevelopMentor
> http://www.leastprivilege.com
>
>> Hello
>>
>> I want to check is the user "X" is in the role "Y" in the application
>> "Z"
>> or if the user "X" is in any of the roles of the application "Z"
>> the roles being defined in the xml file (by AzMan as interface).
>> Thank you,
>> Alina
>> "Dominick Baier [DevelopMentor]"
>> <dbaier@pleasepleasenospamdevelop.com> wrote in message
>> news:42565460e2c168c7883af6b536e8@news.microsoft.com...
>>
>>> Hello A,
>>>
>>> can you please clarify what you want to achieve?
>>> ---------------------------------------
>>> Dominick Baier - DevelopMentor
>>> http://www.leastprivilege.com
>>>> Hello
>>>>
>>>> I'm using xml based AzMan (I'm on Win XP) and Active Directory
>>>> users.
>>>> I want
>>>> to be able to know if a user belongs to a certain role from an app.
>>>> If I'm doing like in the code below, I'm not capable to see in the
>>>> windows
>>>> principal the roles defined in the .xml AzMan file.
>>>> IAzApplication iapp = this.store.OpenApplication(appName, null);
>>>> ArrayList al = new ArrayList();
>>>> WindowsPrincipal wp =
>>>> (WindowsPrincipal)System.Threading.Thread.CurrentPrincipal;
>>>> foreach (IAzRole appRole in iapp.Roles)
>>>> {
>>>> if (wp.IsInRole(appRole.Name))
>>>> {
>>>> return true;
>>>> }
>>>> }
>>>> How can I load in the WindowsPrincipal the AzMan roles ? Or how can
>>>> I
>>>> check directly (using the AzMan library) if a user belongs to a role
>>>> /
>>>> app. ?
>>>> Thank you,
>>>> Alina
>
>
- Previous message: Nicole Calinoiu: "Re: Strong Names Secure???"
- In reply to: Dominick Baier [DevelopMentor]: "Re: xml based AzMan and ActiveDirectory"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Relevant Pages
|