SharedFolderContentsModel ContentsModel(RequestSharedFolder folder, RequestListGetModel req) { throw new Lpp.Utilities.CodeToBeUpdatedException(); //var folderId = folder.Id; //var can = Can(folder); //return new SharedFolderContentsModel //{ // Folder = folder, // AllowEdit = can(SecPrivileges.Crud.Edit), // AllowRemove = can(SecPrivileges.RequestSharedFolder.RemoveRequests), // Requests = new RequestListModel // { // List = SharedFolders.All // .Where(f => f.Id == folderId) // .SelectMany(f => f.Requests) // .Select(RequestListRowModel.FromRequest) // .Where(RequestController.GetTypeFilter(req.RequestTypeFilter)) // .ListModel(req, _requestSort), // Project = null, // No projects separation for shared requests // TreeNode = TreeNodes.SharedFolderNode(folder), // GrantedRequestTypes = RequestController.RequestService.GetGrantedRequestTypes(req.ProjectId), // AllRequestTypes = RequestController.Plugins.GetPluginRequestTypes(), // UsedRequestTypes = RequestController.GetUsedRequestTypes() // } //}; }
ActionResult _Contents <TView>(Guid folderId, RequestListGetModel req) where TView : WebViewPage <SharedFolderContentsModel> { throw new Lpp.Utilities.CodeToBeUpdatedException(); //var f = SharedFolders.Find(folderId); //if (f == null) return HttpNotFound(); //if (!Security.HasPrivilege(Sec.Target(f), Auth.CurrentUser, SecPrivileges.Crud.Read)) throw new UnauthorizedAccessException(); //return View<TView>().WithModel(ContentsModel(f, req)); }
public ActionResult ContentsBody(Guid folderId, RequestListGetModel req) { return(_Contents <Views.SharedFolders.ContentsBody>(folderId, req)); }