AzMan Roles and Operations
-
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.OperationsBut I can't iterate through them. Any help would be much appreciated!
-
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.OperationsBut I can't iterate through them. Any help would be much appreciated!
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 )
-
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 )
This is a standard Windows (COM) Library ...
modified on Tuesday, May 5, 2009 5:15 AM
-
This is a standard Windows (COM) Library ...
modified on Tuesday, May 5, 2009 5:15 AM
I'm having exactly the sample problem - no operations are shown for a given role. Seems like a bug to me....
-
I'm having exactly the sample problem - no operations are shown for a given role. Seems like a bug to me....
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.