/// <summary>
        /// Shows the page CSS.
        /// </summary>
        /// <param name="pageId">The page id.</param>
        /// <returns></returns>
        public virtual ActionResult ShowPagePermissions(long pageId)
        {
            Page page = pageService.Find(pageId);

            if (page == null || !permissionService.IsAllowed((Int32)PageOperations.Permissions, this.CorePrincipal(), typeof(Page), pageId, IsPageOwner(page), PermissionOperationLevel.Object))
            {
                throw new HttpException((int)HttpStatusCode.NotFound, Translate("Messages.NotFound"));
            }

            return(PartialView(MVC.Pages.Views.PagePermissions, permissionHelper.BindPermissionsModel(pageId, typeof(Page), false)));
        }
        public virtual ActionResult ShowPermissions(long categoryId)
        {
            var category = categoryService.Find(categoryId);

            if (category == null || !permissionService.IsAllowed((Int32)CategoryOperations.Permissions, this.CorePrincipal(), typeof(WebContentCategory), category.Id, IsCategoryOwner(category), PermissionOperationLevel.Object))
            {
                throw new HttpException((int)HttpStatusCode.NotFound, HttpContext.Translate("Notfound", ResourceHelper.GetControllerScope(this)));
            }

            return(View("ShowPermissions", permissionsHelper.BindPermissionsModel(category.Id, typeof(WebContentCategory), false)));
        }
Exemplo n.º 3
0
        public virtual ActionResult ShowPermissions(long articleId)
        {
            var article = articleService.Find(articleId);

            if (article == null || !permissionService.IsAllowed((Int32)ArticleOperations.Permissions, this.CorePrincipal(), typeof(Article), article.Id, IsArticleOwner(article), PermissionOperationLevel.Object))
            {
                throw new HttpException((int)HttpStatusCode.NotFound, HttpContext.Translate("Notfound", ResourceHelper.GetControllerScope(this)));
            }

            return(View("ShowPermissions", permissionsHelper.BindPermissionsModel(article.Id, typeof(Article), false)));
        }
Exemplo n.º 4
0
        public virtual ActionResult ShowPermissions(long formId)
        {
            var form = formsService.Find(formId);

            if (form == null || !permissionService.IsAllowed((Int32)FormOperations.Permissions, this.CorePrincipal(), typeof(Form), form.Id, IsFormOwner(form), PermissionOperationLevel.Object))
            {
                throw new HttpException((int)HttpStatusCode.NotFound, HttpContext.Translate("Notfound", ResourceHelper.GetControllerScope(this)) /*"Not Found"*/);
            }

            return(View("FormPermissions", permissionsHelper.BindPermissionsModel(form.Id, typeof(Form), false)));
        }
        public virtual ActionResult ShowPermissions(long formId)
        {
            var form = _formsService.Find(formId);

            if (form == null || !_permissionService.IsAllowed((Int32)FormOperations.Permissions, this.CorePrincipal(), typeof(Form), form.Id, IsFormOwner(form), PermissionOperationLevel.Object))
            {
                throw new HttpException((int)HttpStatusCode.NotFound, "Not Found");
            }

            return(View("Admin/FormPermissions", _permissionsHelper.BindPermissionsModel(form.Id, typeof(Form), false)));
        }