Пример #1
0
        public override void OnAuthorization(AuthorizationContext filterContext)
        {
            account_types = AccountTypes.ToList();

            PrasagIdentity id = new PrasagIdentity();
            PrasagPrincipal User = new PrasagPrincipal(filterContext.HttpContext, id, new PrasagMemberManager());
            SetLocalTestID(User);

            filterContext.HttpContext.User = User;
            base.OnAuthorization(filterContext);
        }
Пример #2
0
        bool valid_account(PrasagPrincipal user)
        {

            if (account_types.Contains(AccountType.members))
            {
                if (!valid_login(user.member))
                {
                    currentError = member_login;
                    return false;
                }
                if (!valid_active(user.member))
                {
                    currentError = member_active;
                    return false;
                }
            }
            return true;
        }
Пример #3
0
 protected void SetLocalTestID(PrasagPrincipal User)
 {
     if (Website.IsLocal)
     {
         if (LocalTestMemberID > 0)
         {
             User.member.SetLocalTestId(LocalTestMemberID);
         }               
     }
 }