public ActionResult SelectFiles(string filePath) { string userName = Membership.GetUser().UserName; DocumentsOperations documentsOperations = new DocumentsOperations(); IList<OOTS.Models.File> databasefiles = documentsOperations.GetFilesByUserName(userName); //return View(new GridModel<OOTS.Models.File> //{ // Total = files.Count, // Data = files //}); string rootpath = UtilityOperations.GetOOTSRootPath(Server); IList<FileModel> files = FileModel.GetFiles(filePath == "" || filePath == "/" ? rootpath : filePath); IList<FileModel> authorizedFiles = documentsOperations.FilterBasedOnAuthorizationsAndPopulateNiceNameAndDescription(files, databasefiles); return View(new GridModel<FileModel> { Total = authorizedFiles.Count, Data = authorizedFiles }); }