Exemplo n.º 1
0
        private bool ValidateAVCodes()
        {
            bool isValid = false;
            HAR_StringEncrypter encrypter   = new HAR_StringEncrypter();
            AwareAppSettings    appSettings = new AwareAppSettings();
            AwareHelpers        awHelpers   = new AwareHelpers(appSettings.GetAwareDbConnectionString);

            if (true == awHelpers.AwareSecurity.VerifyUserCredentials(tboxUserName.Text, encrypter.EncryptString(tboxPassword.Text)))
            {
                isValid = true;
            }

            return(isValid);
        }
Exemplo n.º 2
0
        private bool ValidateGroupMembership()
        {
            bool validated = false;
            List <GroupPrincipal> grpMemberships = new List <GroupPrincipal>();

            grpMemberships = GetUserGroups(tboxUserName.Text);
            AwareAppSettings appSettings = new AwareAppSettings();
            AwareHelpers     awHelpers   = new AwareHelpers(appSettings.GetAwareDbConnectionString);

            foreach (GroupPrincipal grp in grpMemberships)
            {
                awHelpers.AwareSecurity.IsGroupPermittedAccess(grp.Name);
            }

            return(validated);
        }
Exemplo n.º 3
0
        private bool ValidateSUlogon()
        {
            bool             isSu        = false;
            AwareAppSettings appSettings = new AwareAppSettings();
            string           suList      = appSettings.GetSuperUserList;

            if (0 < suList.Length)
            {
                foreach (string su in suList.Split(';'))
                {
                    if (tboxUserName.Text.ToUpper() == su)
                    {
                        isSu = true;
                        break;
                    }
                }
            }

            return(isSu);
        }