Exemplo n.º 1
0
        public ActionResult Edit()
        {
            if (!Service.AccountExists(CurrentAccountId))
            {
                return(LogOut());
            }

            return(View(Service.Get <ProfileEditView>(CurrentAccountId)));
        }
Exemplo n.º 2
0
        public ActionResult Unauthorized()
        {
            if (!Service.AccountExists(CurrentAccountId))
            {
                return(RedirectToAction("Logout", "Auth"));
            }

            return(View());
        }
Exemplo n.º 3
0
        public ActionResult Unauthorized()
        {
            if (!Service.AccountExists(CurrentAccountId))
            {
                return(LogOut());
            }

            return(View());
        }
Exemplo n.º 4
0
        public ActionResult Index()
        {
            if (!Service.AccountExists(CurrentAccountId))
            {
                return(LogOut());
            }

            return(View());
        }
Exemplo n.º 5
0
        public ActionResult Delete()
        {
            if (!Service.AccountExists(CurrentAccountId))
            {
                return(LogOut());
            }

            Alerts.Add(AlertTypes.Danger, Messages.ProfileDeleteDisclaimer, 0);

            return(View());
        }
Exemplo n.º 6
0
        public ActionResult Edit(ProfileEditView profile)
        {
            if (!Service.AccountExists(CurrentAccountId))
            {
                return(LogOut());
            }

            if (Validator.CanEdit(profile))
            {
                Service.Edit(profile);
                Alerts.Add(AlertTypes.Success, Messages.ProfileUpdated);
            }

            return(View(profile));
        }
Exemplo n.º 7
0
        public ActionResult DeleteConfirmed(AccountView profile)
        {
            if (!Service.AccountExists(CurrentAccountId))
            {
                return(LogOut());
            }

            if (!Validator.CanDelete(profile))
            {
                Alerts.Add(AlertTypes.Danger, Messages.ProfileDeleteDisclaimer, 0);
                return(View());
            }

            Service.Delete(CurrentAccountId);

            return(LogOut());
        }