Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. AzMan Roles and Operations

AzMan Roles and Operations

Scheduled Pinned Locked Moved C#
comsecurityxmlhelptutorial
5 Posts 4 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • B Offline
    B Offline
    bonkers123
    wrote on last edited by
    #1

    Hi, I'm having trouble to obtain the Roles, and the Operations etc. attached to a specific role. I have a few operations, and a few roles. I want to Iterate through these roles and obtain the operations linked to these roles. Now I know how to iterate trough these roles and operations individually ... But I don't know how to obtain the link between the two... I'm using the AZROLESLib.

    string storeAddress = "msxml://" + Environment.CurrentDirectory + "\\AuthorizationStore.xml";
    AzAuthorizationStoreClass store;
    store = new AzAuthorizationStoreClass();
    store.Initialize(0, storeAddress, null);
    IAzApplication app = store.OpenApplication("Abatis", null);

      for (int i = 1; i <= app.Roles.Count; i++)
      {
        Microsoft.Interop.Security.AzRoles.IAzRole role =
          (Microsoft.Interop.Security.AzRoles.IAzRole)app.Roles\[i\];
        String roleName = role.Name;
        
      }
    
      
    
      for (int i = 1; i <= app.Operations.Count; i++)
      {
        Microsoft.Interop.Security.AzRoles.IAzOperation operation =
          (Microsoft.Interop.Security.AzRoles.IAzOperation) app.Operations\[i\];
        try
        {
          
          String val = operation.Name.Replace(" ", string.Empty);
        }
        catch (Exception ex)
        {
    
        }
      }
    

    I can't find the link ... There is an Operations field if you open the roles as follow:

    IAzRole roleVal = app.OpenRole(roleName, null);
    roleVal.Operations

    But I can't iterate through them. Any help would be much appreciated!

    C 1 Reply Last reply
    0
    • B bonkers123

      Hi, I'm having trouble to obtain the Roles, and the Operations etc. attached to a specific role. I have a few operations, and a few roles. I want to Iterate through these roles and obtain the operations linked to these roles. Now I know how to iterate trough these roles and operations individually ... But I don't know how to obtain the link between the two... I'm using the AZROLESLib.

      string storeAddress = "msxml://" + Environment.CurrentDirectory + "\\AuthorizationStore.xml";
      AzAuthorizationStoreClass store;
      store = new AzAuthorizationStoreClass();
      store.Initialize(0, storeAddress, null);
      IAzApplication app = store.OpenApplication("Abatis", null);

        for (int i = 1; i <= app.Roles.Count; i++)
        {
          Microsoft.Interop.Security.AzRoles.IAzRole role =
            (Microsoft.Interop.Security.AzRoles.IAzRole)app.Roles\[i\];
          String roleName = role.Name;
          
        }
      
        
      
        for (int i = 1; i <= app.Operations.Count; i++)
        {
          Microsoft.Interop.Security.AzRoles.IAzOperation operation =
            (Microsoft.Interop.Security.AzRoles.IAzOperation) app.Operations\[i\];
          try
          {
            
            String val = operation.Name.Replace(" ", string.Empty);
          }
          catch (Exception ex)
          {
      
          }
        }
      

      I can't find the link ... There is an Operations field if you open the roles as follow:

      IAzRole roleVal = app.OpenRole(roleName, null);
      roleVal.Operations

      But I can't iterate through them. Any help would be much appreciated!

      C Offline
      C Offline
      Christian Graus
      wrote on last edited by
      #2

      bonkers123 wrote:

      I'm using the AZROLESLib.

      You probably need to talk to whoever wrote that library then.

      Christian Graus Driven to the arms of OSX by Vista. "I am new to programming world. I have been learning c# for about past four weeks. I am quite acquainted with the fundamentals of c#. Now I have to work on a project which converts given flat files to XML using the XML serialization method" - SK64 ( but the forums have stuff like this posted every day )

      B 1 Reply Last reply
      0
      • C Christian Graus

        bonkers123 wrote:

        I'm using the AZROLESLib.

        You probably need to talk to whoever wrote that library then.

        Christian Graus Driven to the arms of OSX by Vista. "I am new to programming world. I have been learning c# for about past four weeks. I am quite acquainted with the fundamentals of c#. Now I have to work on a project which converts given flat files to XML using the XML serialization method" - SK64 ( but the forums have stuff like this posted every day )

        B Offline
        B Offline
        bonkers123
        wrote on last edited by
        #3

        This is a standard Windows (COM) Library ...

        modified on Tuesday, May 5, 2009 5:15 AM

        R 1 Reply Last reply
        0
        • B bonkers123

          This is a standard Windows (COM) Library ...

          modified on Tuesday, May 5, 2009 5:15 AM

          R Offline
          R Offline
          robalexclark
          wrote on last edited by
          #4

          I'm having exactly the sample problem - no operations are shown for a given role. Seems like a bug to me....

          N 1 Reply Last reply
          0
          • R robalexclark

            I'm having exactly the sample problem - no operations are shown for a given role. Seems like a bug to me....

            N Offline
            N Offline
            nollusions
            wrote on last edited by
            #5

            I am also facing the same problem. has anybody got the fix or is it a known bug? Is there a workaround for accesing the operations associated witha specific role in Azman? Also, documentation at this link http://msdn.microsoft.com/en-us/library/aa375751(v=VS.85).aspx[^] mentions that there is an interface "IAzRoleDefinition" which I thought of using but this interface is not available in the API for the interop assembly version 1.2. Has anybody faced similar problem? Please please reply!!! Need a solution quick. Any response is greatly appreciated.

            1 Reply Last reply
            0
            Reply
            • Reply as topic
            Log in to reply
            • Oldest to Newest
            • Newest to Oldest
            • Most Votes


            • Login

            • Don't have an account? Register

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • World
            • Users
            • Groups