コード例 #1
0
        public ActionResult Index(string url, string title)
        {
            var list = PermissionClientService.GetViewablePermissionResources("Admin");

            this.ViewBag.Permissions  = JsonConvert.SerializeObject(list);
            this.ViewBag.DefaultUrl   = ControllerExtensions.GetReturnUrl(url, false);
            this.ViewBag.DefaultTitle = title;
            this.ViewBag.DisplayName  = (this.User.Identity as PassportIdentity).DisplayName;
            return(this.View());
        }
コード例 #2
0
 private ActionResult RedirectTo(string returnUrl)
 {
     returnUrl = ControllerExtensions.GetReturnUrl(returnUrl, false);
     if (string.IsNullOrEmpty(returnUrl))
     {
         var svr = ObjectService.GetObject <IPassportAuthentication>();
         returnUrl = svr.Setting.DefaultUrl;
     }
     return(this.Redirect(returnUrl));
 }