Ejemplo n.º 1
0
        public ActionResult Menuadmin()
        {
            var currentuser = UserReposibility.getcurrentUser(User);

            ViewBag.role = UserReposibility.getrolesuser(User);
            return(PartialView(currentuser));
        }
Ejemplo n.º 2
0
        public ActionResult Header()
        {
            ViewBag.Authentication = false;
            var header = new HeaderModel
            {
                category = categorysponsibility.getlist(),
                shop     = ibranchrepository.getlist()
            };

            if (User.Identity.IsAuthenticated)
            {
                var opl = (ClaimsIdentity)User.Identity;


                var username = User.Identity.Name;
                var role     = UserReposibility.getrolesuser(User);
                ViewBag.Username       = username;
                ViewBag.role           = role;
                ViewBag.Authentication = true;
                IEnumerable <Claim> claims = opl.Claims;
            }
            return(View(header));
        }