public GetStatusOfSecurityOM GetUserStatusOfSecurity(UserAccount user)
        {
            GetStatusOfSecurityOM entity = new GetStatusOfSecurityOM();

            entity.GoogleAuthenticator = new SecurityStatus
            {
                HasBinded = !string.IsNullOrEmpty(user.AuthSecretKey),
                HasOpened = ValidationFlagComponent.CheckSecurityOpened(user.ValidationFlag, ValidationFlag.GooogleAuthenticator)
            };
            return(entity);
        }
Esempio n. 2
0
        public GetStatusOfSecurityOM GetMerchantStatusOfSecurity(Guid merchantId)
        {
            var merchant = new MerchantAccountDAC().GetById(merchantId);

            if (merchant == null)
            {
                throw new CommonException(ReasonCode.ACCOUNT_NOT_EXISTS, Resources.用户不存在);
            }
            GetStatusOfSecurityOM entity = new GetStatusOfSecurityOM();

            entity.GoogleAuthenticator = new SecurityStatus
            {
                HasBinded = !string.IsNullOrEmpty(merchant.AuthSecretKey),
                HasOpened = ValidationFlagComponent.CheckSecurityOpened(merchant.ValidationFlag, ValidationFlag.GooogleAuthenticator)
            };
            return(entity);
        }