Пример #1
0
        public async Task <ActionResult> Index(int?appId)
        {
            if (appId.HasValue)
            {
                var hasAuthority = await _permissionService.AuthorityCheck(appId.Value + ".0", ((User)Session["User"]).RoleId);

                if (!hasAuthority)
                {
                    return(Redirect("/Page/NoPermission"));
                }
                Session["AppId"] = appId;
            }
            return(View());
        }