Note that there are some explanatory texts on larger screens.

plurals
  1. POGetting a list of Tasks that belong to a Role from Azman
    primarykey
    data
    text
    <p>I'm using the AZROLESLib which is from the COM references "azroles 1.0 Type Library" and I am trying to create a list of the designated tasks for each role that I have currently set in my authorization manager but when I loop through the tasks for the role, I get the role name.</p> <p>I've looked all around but couldn't find anything that would help.</p> <p>Here's what I got currently (It's not super pretty but i'm just trying to get it working at the moment).</p> <pre><code>AzAuthorizationStoreClass AzManStore = new AzAuthorizationStoreClass(); AzManStore.Initialize(0, ConfigurationManager.ConnectionStrings["AzManStore"].ConnectionString, null); IAzApplication azApp = AzManStore.OpenApplication("StoreName", null); StringBuilder output = new StringBuilder(); Array tasks = null; foreach (IAzRole currentRole in azApp.Roles) { output.Append(currentRole.Name + "&lt;br /&gt;"); tasks = (Array)currentRole.Tasks; foreach (object ob in tasks) { output.Append("&amp;nbsp;&amp;nbsp; -" + ob.ToString() + "&lt;br /&gt;"); } } return output.ToString(); </code></pre> <p><strong>What comes out is</strong>:</p> <ul> <li><p>Administrator -Administrator</p></li> <li><p>Account Manager -Account Manager</p></li> <li><p>Corporate Marketing Specialist -Corporate Marketing Specialist</p></li> <li><p>General Employee -General Employee</p></li> <li><p>Marketing Manager -Marketing Manager</p></li> <li><p>Regional Marketing Specialist -Regional Marketing Specialist</p></li> <li><p>Sales Manager -Sales Manager</p></li> <li><p>Webmaster -Webmaster</p></li> </ul> <p><strong>but what should come out is something like:</strong></p> <ul> <li>Webmaster <ul> <li>Websites Maintain</li> <li>News Maintain</li> <li>Events Maintain</li> <li>Reports Read</li> </ul></li> </ul> <hr> <p>Thanks in advance.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload