Exemple #1
0
        private static List <SecurityActionTreeItem> ReportActionTree()
        {
            List <SecurityActionTreeItem> result = new List <SecurityActionTreeItem>();

            SecurityActionTreeItem noaccess = new SecurityActionTreeItem();

            noaccess.Action = SecurityAction.NoAccess;
            result.Add(noaccess);


            SecurityActionTreeItem access = new SecurityActionTreeItem();

            access.Action     = SecurityAction.Access;
            access.ParentItem = noaccess;
            noaccess.ChildItems.Add(access);
            return(result);
        }
Exemple #2
0
        private static List <SecurityActionTreeItem> ArchiveActionTree()
        {
            List <SecurityActionTreeItem> result   = new List <SecurityActionTreeItem>();
            SecurityActionTreeItem        noaccess = new SecurityActionTreeItem();

            noaccess.Action = SecurityAction.NoAccess;
            result.Add(noaccess);

            SecurityActionTreeItem readonlyaccess = new SecurityActionTreeItem();

            readonlyaccess.Action     = SecurityAction.ReadOnly;
            readonlyaccess.ParentItem = noaccess;
            noaccess.ChildItems.Add(readonlyaccess);

            SecurityActionTreeItem editAndDelete = new SecurityActionTreeItem();

            editAndDelete.Action     = SecurityAction.EditAndDelete;
            editAndDelete.ParentItem = readonlyaccess;
            readonlyaccess.ChildItems.Add(editAndDelete);
            return(result);
        }
Exemple #3
0
        private static List <SecurityActionTreeItem> RelationshipActoinTree()
        {
            List <SecurityActionTreeItem> result = new List <SecurityActionTreeItem>();

            SecurityActionTreeItem noaccess = new SecurityActionTreeItem();

            noaccess.Action = SecurityAction.NoAccess;
            result.Add(noaccess);

            SecurityActionTreeItem readonlyaccess = new SecurityActionTreeItem();

            readonlyaccess.Action     = SecurityAction.ReadOnly;
            readonlyaccess.ParentItem = noaccess;
            noaccess.ChildItems.Add(readonlyaccess);

            //SecurityActionTreeItem editaccess = new SecurityActionTreeItem();
            //editaccess.Action = SecurityAction.Edit;
            //editaccess.ParentItem = readonlyaccess;
            //readonlyaccess.ChildItems.Add(editaccess);

            return(result);
        }
Exemple #4
0
        private static List <SecurityActionTreeItem> DefaultActionTree()
        {
            List <SecurityActionTreeItem> result = new List <SecurityActionTreeItem>();

            SecurityActionTreeItem noaccess = new SecurityActionTreeItem();

            noaccess.Action = SecurityAction.NoAccess;
            result.Add(noaccess);

            //SecurityActionTreeItem menuaccess = new SecurityActionTreeItem();
            //menuaccess.Action = SecurityAction.MenuAccess;
            //menuaccess.ParentItem = noaccess;
            //noaccess.ChildItems.Add(menuaccess);

            //SecurityActionTreeItem archiveMenuaccess = new SecurityActionTreeItem();
            //archiveMenuaccess.Action = SecurityAction.ArchiveMenuAccess;
            //archiveMenuaccess.ParentItem = noaccess;
            //noaccess.ChildItems.Add(archiveMenuaccess);

            SecurityActionTreeItem readonlyaccess = new SecurityActionTreeItem();

            readonlyaccess.Action     = SecurityAction.ReadOnly;
            readonlyaccess.ParentItem = noaccess;
            noaccess.ChildItems.Add(readonlyaccess);

            SecurityActionTreeItem editonlyaccess = new SecurityActionTreeItem();

            editonlyaccess.Action     = SecurityAction.Edit;
            editonlyaccess.ParentItem = readonlyaccess;
            readonlyaccess.ChildItems.Add(editonlyaccess);

            SecurityActionTreeItem editanddeleteaccess = new SecurityActionTreeItem();

            editanddeleteaccess.Action     = SecurityAction.EditAndDelete;
            editanddeleteaccess.ParentItem = editonlyaccess;
            editonlyaccess.ChildItems.Add(editanddeleteaccess);


            SecurityActionTreeItem archiveviewaccess = new SecurityActionTreeItem();

            archiveviewaccess.Action     = SecurityAction.ArchiveView;
            archiveviewaccess.ParentItem = noaccess;
            noaccess.ChildItems.Add(archiveviewaccess);

            SecurityActionTreeItem archiveeditaccess = new SecurityActionTreeItem();

            archiveeditaccess.Action     = SecurityAction.ArchiveEdit;
            archiveeditaccess.ParentItem = archiveviewaccess;
            archiveviewaccess.ChildItems.Add(archiveeditaccess);



            SecurityActionTreeItem letterviewaccess = new SecurityActionTreeItem();

            letterviewaccess.Action     = SecurityAction.LetterView;
            letterviewaccess.ParentItem = noaccess;
            noaccess.ChildItems.Add(letterviewaccess);

            SecurityActionTreeItem lettereditaccess = new SecurityActionTreeItem();

            lettereditaccess.Action     = SecurityAction.LetterEdit;
            lettereditaccess.ParentItem = letterviewaccess;
            letterviewaccess.ChildItems.Add(lettereditaccess);


            return(result);
            //new List<SecurityAction>() { SecurityAction.NoAccess, SecurityAction.MenuAccess, SecurityAction.ReadOnly, SecurityAction.Delete, SecurityAction.Edit };
        }
Exemple #5
0
 private void SetParentsAsIgnorableActions(List <SecurityActionTreeItem> ignorableActions, SecurityActionTreeItem actionTreeItem)
 {
     if (actionTreeItem != null)
     {
         ignorableActions.Add(actionTreeItem.ParentItem);
         SetParentsAsIgnorableActions(ignorableActions, actionTreeItem.ParentItem);
     }
 }