I have a library where the default view shows only documents created by the user or one's assigned to them, allowing me to give the perception of people having their own personal library when in fact it is shared by all users. Group one will see this default view and will not be able to create any views, public or private. Group two will see this default view as well but they can also see another "all documents" view that group one cannot.

First thought I had was to simply create the default view, and then give group two people permissions to create their own views, so that they can create their own "all documents" view, but asking people to do things doesn't seem like the utmost professional solution as they expect everything to be automatically done for them.

Second thought was adding a second webpart that would show all documents and make the audience group two only, and make the audience of the webpart that shows the default view group one only. So one webpart for group one audience would hide the library view menu and search bar and only show the default view, the other webpart for group two audience would show the view menu, search bar and they would see an "All Documents" view option.

I implemented this idea, and it looks like it can actually work, but I have to realize that these webparts need to be set on each of the library's view pages, and it gets tricky. I used css on the master page to hide the sync button, and I also disabled it in the library settings (which only causes the menu option to grey out). On one webpart, the sync button is gone, but on the other webpart, it is grayed out but it shows. That means that somehow the id name for that menu button is being duplicated in the other webpart and duplicate ids are supposed to be a no no. Or it's being renamed to something else.

So I am becoming suspicious of my approach as it seems a little "hackish" when you run into problems like these. Has anybody else had to do this and what did you find the best method was?

1 Answer 1


You're "securing" those documents from group one by hiding them from group one — which isn't securing them. They'll still show up in search results and such. It's security via obfuscation.

That said — I've totally done this too. Maybe actually securing the documents isn't your goal.

In that case, what i did was abandon the view pages in the library (I hid the web parts on the view pages), and force everyone to view that library through web parts on web part pages that I controlled. In that way, you govern who sees which pages/web parts and their associated filters.

  • That is a helpful answer. I tried that as well. The problem is that when you use word online and click the link at the top of the doc to get back to the library, you instead go back to the actual library itself rather than the web part page. MS always baits you, but then disappoints you on something simple that they should have thought of
    – Bobh
    Apr 29, 2017 at 12:40
  • As far as search goes, that library is not indexed on purpose for the very reasons you mentioned and will remain so until I find a solution for user filtered results
    – Bobh
    Apr 29, 2017 at 12:45

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.