public IActionResult NewsPostCreateForm() { if (!_newsSecurity.AuthorizeForCreate()) { return(Unauthorized()); } var userContext = _userContextAccessor.GetContext(); var newsPost = _newsManager.CreateNewsPost(userContext.UserId); var versionInfo = _contentManager.GetVersionInfo(NewsManager.CONTENT_TYPE_NEWSPOST, newsPost.Id, newsPost.VersionCode).Result; // build the view model var newsPostViewModel = newsPost.ProjectTo <NewsPostViewModel>(); newsPostViewModel.VersionLabel = versionInfo.VersionLabel; newsPostViewModel.PostPrivacyConfig = BuildPostPrivacyOptions(newsPost); newsPostViewModel.Categories = new NewsCategory[] { }; return(this.PartialContentView(new ContentBindings(versionInfo) { ViewPath = "/UI/Views/Console/News/newsPostDesign.cshtml", ViewModel = newsPostViewModel, Editable = true })); }