Document library item permissions
-
09-12-2019 - |
Question
I have a document library containing a lot of personal information. Originally only admins could see the library but now it has been decided that users need to see their own information. Admins have Full Control and users have Read. The default view shows only documents where the user's name appears in a certain field. So Default View, Name="[Me]" so they can only see their own files. This works fine but it doesn't stop users from opening the library in Explorer view. How can I stop them doing this?
Any suggestions?
Note: I do not have access to Central Administration
Solution 2
I used the code from the following blog post and some hints from this one.
Below is the code I finally used, it will disable Explorer View for everyone but admins can then create their own Explorer view if required.
<script type="text/javascript">
_spBodyOnLoadFunctionNames.push("hideToolbarItem()");
function hideToolbarItem()
{
var doc = document.getElementsByTagName('ie:menuitem');
for (var i = 0; i < doc.length; i++)
{
itm = doc[i];
if (itm.id.match('OpenInExplorer')!=null)
{
itm.hidden=true;
}
}
}
</script>
OTHER TIPS
Here is a few views on how to achieve this: