コード例 #1
0
        private void GetDetails(IAzManDBUser dbUser)
        {
            txtDetails.Text = String.Format(@"
Check Access Test started at {0}

Identity Details:
Name: {1}Custom Sid: {2}
", DateTime.Now.ToString(), dbUser.UserName + "\t", dbUser.CustomSid);

            txtDetails.Text += "Member of these Store Groups:" + Environment.NewLine;

            foreach (IAzManStoreGroup storeGroup in _Application.Store.GetStoreGroups())
            {
                if (storeGroup.IsInGroup(dbUser))
                {
                    txtDetails.Text += storeGroup.Name + Environment.NewLine;
                }
            }

            txtDetails.Text += "Member of these Application Groups:" + Environment.NewLine;
            foreach (IAzManApplicationGroup applicationGroup in _Application.GetApplicationGroups())
            {
                if (applicationGroup.IsInGroup(dbUser))
                {
                    txtDetails.Text += applicationGroup.Name + Environment.NewLine;
                }
            }

            #region Load Hierarchy();
            txtDetails.Text += Environment.NewLine;
            txtDetails.Text += "Building Items Hierarchy ...";

            tvwResults.Nodes.Clear();
            BuildApplicationsTreeView();
            tvwResults.ExpandAll();

            txtDetails.Text += "Done." + Environment.NewLine + Environment.NewLine;
            #endregion

            #region Check Access
            TreeNode applicationTreeNode = tvwResults.Nodes[0].Nodes[0];
            foreach (TreeNode itemTreeNode in applicationTreeNode.Nodes)
            {
                CheckNodeAccess(itemTreeNode);
            }

            txtDetails.Text += Environment.NewLine;
            txtDetails.Text += "Check Access Test finished at " + DateTime.Now.ToString();
            #endregion
        }
コード例 #2
0
        private void LoadList()
        {
            SetListView();
            lvwStoreGroups.Items.Clear();

            IAzManApplicationGroup[] appGroups = _Application.GetApplicationGroups();
            foreach (IAzManApplicationGroup appGroup in appGroups)
            {
                if ((_StoreGroup == null) || (_StoreGroup != null && appGroup.SID.StringValue != _StoreGroup.SID.StringValue))
                {
                    ListViewItem oItem = lvwStoreGroups.Items.Add(appGroup.Name);
                    oItem.SubItems.Add(appGroup.Description);
                    oItem.SubItems.Add(appGroup.GroupType == GroupType.Basic ? "Basic Group" : "LDAP Group");
                }
            }

            lvwStoreGroups.Sort();
        }