Esempio n. 1
0
        private void SaveRole(string aRole, string anApplication, TreeNode aTreeNode)
        {
            List <string> selectedOperations = TreeViewToOperationsListTranslator.Translate(aTreeNode);
            List <string> allTreeOperations  = TreeViewToOperationsListTranslator.GetAllNodeOperations(GetRootNode());

            AzManWriter.SaveRole(selectedOperations, aRole, anApplication, allTreeOperations);
            isRoleSaved = true;
        }
Esempio n. 2
0
        private void LoadRoleActionsIntoTreeNode(TreeNode aTreeNode)
        {
            string currentRole;

            if (RolesComboBox.SelectedItem == null)
            {
                currentRole = RolesComboBox.Items[0].ToString();
            }
            else
            {
                currentRole = GetSelectedRole();
            }
            List <string> operationsList = AzManReader.ReadOperationsRole(GetSelectedApplication(), currentRole);

            if (operationsList != null)
            {
                OperationLoader.LoadIntoTreeNode(aTreeNode, operationsList);
            }
            List <string> allTreeOperations = TreeViewToOperationsListTranslator.GetAllNodeOperations(GetRootNode());

            duplicateKeys = allTreeOperations.GroupBy(x => x).Where(group => group.Count() > 1).Select(group => group.Key).ToList();
        }