Exemple #1
0
        /// <summary>
        /// Creates the warewolf group and adds the current user.
        /// </summary>
        private static void CreateWarewolfGroupAndAddCurrentUser()
        {
            var wso = MoqInstallerActionFactory.CreateSecurityOperationsObject();

            // Get the current executing user ;)
            var currentUser   = System.Security.Principal.WindowsIdentity.GetCurrent(false);
            var machineName   = Environment.MachineName;
            var userAddString = wso.FormatUserForInsert(currentUser.Name, machineName);

            wso.AddUserToWarewolf(userAddString);
        }
Exemple #2
0
        public void ExecuteMoqInstallerActions()
        {
            var wso = MoqInstallerActionFactory.CreateSecurityOperationsObject();

            if (!wso.DoesWarewolfGroupExist())
            {
                wso.AddWarewolfGroup();
            }
            else
            {
                wso.DeleteWarewolfGroup();
                wso.AddWarewolfGroup();
            }

            CreateWarewolfGroupAndAddCurrentUser();
            AddAdministratorsToWarewolfGroup();
        }
Exemple #3
0
        private static void AddAdministratorsToWarewolfGroup()
        {
            var wso = MoqInstallerActionFactory.CreateSecurityOperationsObject();

            wso.AddAdministratorsGroupToWarewolf();
        }