restrict image library
Good day,
I am trying to restrict an image library to Administrators. I have attached an image showing the current settings for restricting the library. If I log in as a user in the TIS role I can still view the library. I only have the TIS role in Sitefinity. I tried restricting View Images by explicitly denying the TIS role and that didn't work either. If I restrict View Images to Administrators no one who goes to the live web site will see the images.
Thanks in advance,
Rob
Hello,
By default, the queries are not filtered by View permissions. However, there is a configuration setting to enable FilterQueriesByViewPermissions globally for all data providers, or set it per provider overriding the default value. More information could be found in the following KB article.
It is also possible to enable this behavior on a specific provider (e.g. LibrariesProvider since you are using documents and libraries):
Navigate through the main menu Administration -> Settings -> Advanced, Scroll to the Libraries node -> Providers -> OpenAccessDataProvider (or any other provider you are using to retrieve your files) -> Parameters, click "Create new", set the Key field to "filterQueriesByViewPermissions" (without quotes) and the Value field to "true" (without quotes) and Save changes.
Then reset your system and see if the permissions are being applied correctly.
Kind regards,
Stefani Tacheva
the Telerik team
Good day Stefani,
Thanks for the help. Adding in the parameter worked, now only the roles that are allowed can view the library.
Rob
Hello Rob,
I am glad to hear that everything is working as expected on your side.
All the best,
Stefani Tacheva
the Telerik team
Hi Stefani,
Now that I got the backend user permissions straightened I noticed something to do with the libray permissions regarding our live site.
If I go to the library and set permissions for Who can... and set view images to a particular role it works great for the backend but what is happening on our live site is no one can see the images. I was wondering if this is because somewhere the credentials of the user that was logged in are being held somewhere and that is why the images are not showing. I have cleared the cache etc but it the images still will not appear unless I change the View images to everyone then explicitly deny certain roles. We have a large number of roles so having to select a large majority of the roles is a bit time consuming when you are doing this for many libraries. Say I am not a member of the Role that is set to view the images should I not be able to view the images on the live site? I thought since the live site has no idea who I am or what roles I belong to the permissions I set for the library only pertain to users that login to edit their web page, are backend users.
Thanks,
Rob
Hello,
The problem might be connected to a bug that we have found in Sitefinity. To view more information about the problem and how to fix it please refer to our KB article:
http://www.sitefinity.com/developer-network/knowledge-base/non-admin-users-could-not-see-any-images-videos-documents-libraries
Regards,
Stefani Tacheva
the Telerik team