Suggestions Image/Documents & Events Schedule View
I wanted to get my requests in for 4.0. I have two so far. By looking at the road map for 4.0 it looks like my others requests will be accounted for. These two may already be scheduled as part of 4.0, but I'm not sure.
1. I need to be able to set permissions based on role for each image library or document library. Right now there is just permissions for the whole module in 3.7 SP3.
2. It would be nice to use the categories from the Events Module with the Events Schedule View control without modifying the external template. This should be simplified similar to how the News View Control works with the News Module categories.
Hi Bryan Webster,
1. I need to be able to set permissions based on role for each image library or document library. Right now there is just permissions for the whole module in 3.7 SP3.
There will be permissions per library in 4.0. We will also support permissions per item - granular permissions, so you will be able to specify which user is allowed to see/manage a single document or item in a library.
2. It would be nice to use the categories from the Events Module with the Events Schedule View control without modifying the external template. This should be simplified similar to how the News View Control works with the News Module categories.
This will be supported as well.
Just to let you know there is a possible solution in 3.7 to filter the appointments in EventsScheduler control, but this will require to create a custom control that inherits from EventsScheduler control and implement IFilterableContentControl interface. Here is a sample code Insert/Update/Delete content items with RadScheduler for ASP.NET AJAX that shows how to create this custom control.
Best wishes,
Ivan Dimitrov
the Telerik team
"There will be permissions per library in 4.0. We will also support permissions per item - granular permissions, so you will be able to specify which user is allowed to see/manage a single document or item in a library."
Is this still the case? I have followed the instructions on Hiding Libraries based on Roles however this is only for the Boxes view (I tried unsuccessfully for the list view). And it does not address the ability to use the libraries to place permissions on the files themselves.
For another site we used a custom handler and store files directly in folders, however we would like to use the libraries to allow for a custom field to insert the sort order.
Any new suggestions for Permissions on Libraries and/or files?
Thank you!
Hello Laura,
Yes this is still the case for Sitefinity 4.0 which BETA 2 release is out and you can test how permissions work.]
Hiding Libraries based on Roles provided an idea about how you can secure your content. There are many cases that are not covered and this is a blog post not a code base, so it is normal that not all aspects are affected.
1.You can protect all files from direct access by using a standard ASP.NET HttpHandler or handler that inherits from ContentHttpHandler class. Inside the begin request you can check the current principal and from where the request comes from then decide whether to allow file access or not.
2. Hiding libraries in ListView. Possible solution would be replacing the default view and binding the grid or thumbs manually, then set the proper pager depending on the libraries that a given role should see.
protected
override
void
InitializeControls(System.Web.UI.Control viewContainer)
// set up paging
Pager1.SelectedPage = Pager2.SelectedPage =
this
.currentPage;
Pager1.PageCount = Pager2.PageCount = (
int
)Math.Ceiling((
double
)FilteredLibraries / (
double
)
this
.ItemsPerPage);
Pager1.SelectedPageChanged +=
new
EventHandler<EventArgs>(Pager_SelectedPageChanged);
Pager2.SelectedPageChanged +=
new
EventHandler<EventArgs>(Pager_SelectedPageChanged);
AllLibrariesGrid.DataSourceID = FilteredDataSource;
AllLibrariesGrid.MasterTableView.DataKeyNames =
new
string
[]
"ID"
;
AllLibrariesGrid.ItemCommand +=
new
GridCommandEventHandler(AllLibrariesGrid_ItemCommand);
AllLibrariesGrid.ItemCreated +=
new
GridItemEventHandler(AllLibrariesGrid_ItemCreated);
AllLibrariesGrid.ItemDataBound +=
new
GridItemEventHandler(AllLibrariesGrid_ItemDataBound);
if
(!
this
.LibManager.GetPermission(CrudRights.Modify).CheckDemand())
AllLibrariesGrid.Columns[5].Visible =
false
;
AllLibrariesRepeater.DataSourceID = FilteredDataSource;
AllLibrariesRepeater.ItemCreated +=
new
RepeaterItemEventHandler(AllLibrariesRepeater_ItemCreated);
AllLibrariesRepeater.ItemDataBound +=
new
RepeaterItemEventHandler(AllLibrariesRepeater_ItemDataBound)
Thanks so much for prompt and thorough reply. We are ending up with a library of documents per page. But I was thinking of creating a library based on role then setting the category to be by the page it will display on. However, how/can I filter by Category? Use the FilterExpression in the Advanced Tab ? THe Obsolete Member SelectedCategories does not seem to work. Do i have to create some WebUITypeEditor or something?
eh, i got the filter to work for category. Just wish it would be something the end user could do without having to type it in.
Also, for disabling libraries, i will look at 4.0 but also in the meantime i will try to subscribe for ItemDataBound or RowCreate events of the GridView . It is okay to see the library, just not access it. And if i do library by Role it will be much more manageable than a library by page. Different roles can access different pages each with a listing of files to access.
I will create the HttpHandler for the files which we did for a PDFHandler for anther site but the files were in folders directly in the root web and not in the libraries. I will try to figure out how to get them from the libraries...
thanks!
Hi,
When I try to schedule a news item or event item, teh schedule window is behaving funny. I am using IE9.
See attached image.
Many thanks,
Andrei