9

In the previous SharePoint version of SharePoint you couldn't have permissions on list views. Is this now possible on SharePoint Foundation 2010?

So for example I have a list and 2 views but I want to assign permissions to the views so that a user can see view A but not view B.

Also is it possible now to easily set permissions to items instead of having to click each item and assign permissions?

2
  • Are these permissions intended to provide some kind of security or just to reduce the list of views displayed to a particular audience?
    – Steve P
    Commented Oct 13, 2010 at 18:48
  • DRW, can't users still access All Site Content and view your List Views?
    – user17144
    Commented May 22, 2013 at 0:22

6 Answers 6

3

If you're comfortable with a little development, you could achieve this by:

  • Make both your views (I'll call them 'Boy' and 'Girl') hidden. I did this recently in CAML, but you probably could use the object model.

  • Create an application page to redirect users from this new page to the appropriate view. You can implement your own business logic here, however you want. Note that when redirecting, you'll need to make sure your GUIDs are upper case. Also, throw an exception if they don't have rights to either view.

  • Add a link to your redirection page to your navigation, so that users can be redirected.

Now, this solution isn't perfect - it prevents users from seeing the existence of the view(s) to which they lack rights, but doesn't stop the view from working if they type in the correct URL.

I guess a final step would be to add a control or some code to the pages for the Boy and Girl views to check the same business logic as the redirection, and if the user lacks rights to see that page, throws an exception. However, this does not secure the individual items against viewing - but I doubt you can achieve that without simply applying Item level permissions against items on your list.

2

You cannot set permission to views. There are new workflow actions for SharePoint Designer that could ease the per-item permission assignments via workflows. Check this blog post for some ideas, you could create some conditions to assign proper permissions.

3
  • thanks Toni but which one to use though is it the Add List Item Permissions? Just thinking how this could be useful so if i have a list that has 2 categoriies grouped by column name BOY and GIRl. But i want users who logs in as BOY permission sees all the items listed with BOYS colums. Is this possible. Hope you understand by scenario though. Thanks
    – Patrick
    Commented Aug 2, 2010 at 8:18
  • You can check my blog post for more some ideas. sharepointusecases.com/index.php/2010/03/… Commented Aug 2, 2010 at 9:52
  • Toni thanks for the reply.I don't think what i'm looking for is item level permissions and secondly i need for a list.I can say imagine creating a 2 views from a list grouping by 2 different categories.Then would like those categories assigned to different permissions.Do you get me?Permissions on view lists..
    – Patrick
    Commented Aug 5, 2010 at 20:10
0

Another thing you can do is create web part pages in SharePoint Designer that have Data View Web Parts on them. You can then set permissions on those pages or on the entire library where they reside.

4
  • Thanks Rob.Will look into your approach and its quite interesting.But the thing is i would have to use a doc library to set the permissions on the web part pages.Is that right?
    – Patrick
    Commented Aug 5, 2010 at 20:13
  • Yes. You could have one document library and set the permissions at the document level, or you could have multiple document libraries and set permissions for the entire libraries -- whichever makes the most sense in your situation.
    – Rob Wilson
    Commented Aug 6, 2010 at 0:15
  • This confuses people more than anything else and the actual data is not secured. Commented Oct 13, 2010 at 23:15
  • Not sure what you mean by it confuses people. Can you explain? Regarding security, the idea is to remove the default views so more difficult to find. The problem is that search could still find them. The only real fool proof solution I can think of would be to do permissions at the content type level, but that is going to require custom code. It's unfortunate there is no OOB solution for this. It's a popular request. Probably the best approach is to have two different lists with unique, and a view that rolls them up when you need a union of the two.
    – Rob Wilson
    Commented Oct 14, 2010 at 3:40
0

I am not a developer, but I inserted webparts on several web pages. I then targeted the audience of each web part. If a user clicks on the link to the web page where they are not designated as part of the target audience, they do not see the web part. I was worried that someone would click on the title link to the source list that appears above the web part and accidentally get access to all data. To resolve this, I went to the source list page, used edit page to edit that web part and designate a target audience. Because users were creating data on their individual web parts (views) of the list, they needed to have editing rights based on the source list. So they have editing rights but are unable to view areas outside of the web parts where they have been included in a target audience. The tool was to collect budget data. The budget manager gets all his data in one file at the end that he can export to Excel.

0

I would like to understand why you would do all this work to make a web part that is viewable by only a few users where all users can see the content, if the content has not been granted unique permissions. What is the requirement?

Also, I have, for SharePoint 2010, lately been seeing lots of permissions issues where customers are setting unique permissions on multiple folders within a library which is causing a lot of problems in the resultant views. (Anecdotal evidence to be true.) Space is cheap. I would recommend creating new libraries (and lists) for each group of content permissions. Heck, new sub-sites, if possible. The trade-off is that you have to manage the permissions, but if the users wants unique permissions on content, probably better if he manages the permissions. Usually doesn't happen that way, but worth a try.

-1

Just create a page and add a List view web part - in 2013 this is just insert -> Web Part -> select library. You can customize the view on this page and then set permissions to this page.

Don't use audience targeting as mentioned above as this isn't security. SharePoint is security trimmed, so if you add the page to the quick launch, if a user doesn't have access, he wont see it. Just make sure you add it as a heading and not a link.

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.