none
Hide all Items view for users with Contribute permission to the list RRS feed

  • Question

  • Hi Team,

    We have a list, in which we have two views. "All Items" view should be accessible only to users with "Full Control". The users with "Contribute" permission should only able to see "Custom View" and not "All Items" view.

    we have added the list as list web part in home page, in that also the users with "Contribute" permission is able to see "All Items" view. 

    The site we use is SharePoint Online Modern page.

    Could you please help to make the users with "Contribute" permission to see only the items which are created by them and not all items.

    It is highly urgent.

    Thanks,
    Raj

    Thursday, September 26, 2019 11:22 AM

All replies

  • Hi,

    I’m afraid there is no OOB solution to hide a list view for specific users and still show to other users even when using classic experience.

    Per my understanding, you have created two list views, one for Administrator management, the other for user filtering. However, it is not possible to achieve this requirement in SharePoint Online currently since we cannot set permissions for list views.

    Best regards,

    Chelsea Wu


    Please remember to mark the replies as answers if they helped. If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com.

    SharePoint Server 2019 has been released, you can click here to download it.
    Click here to learn new features. Visit the dedicated forum to share, explore and talk to experts about SharePoint Server 2019.

    Friday, September 27, 2019 2:34 AM
  • Hi Chelsea,

    Thanks for the response.

    But I need to achieve this with a single list. Is there way to enable "Audience Targeting" through List Settings and facilitate Audience targeting in List View Web part in Home page of the site.

    Thanks,

    Raj

    Friday, September 27, 2019 7:24 AM
  • Hi,

    Audience Targeting is not available for list web part on modern pages. Only the highlighted content web part and the news web part support audience targeting for the time being.

    You can set target audience for list web part on a classic wiki page via Edit Web Part > Advanced > target audience. It allows multiple audiences. 

    Here’s your reference.

    Target files, news and pages to specific audiences.

    https://support.office.com/en-us/article/target-files-news-and-pages-to-specific-audiences-33d84cb6-14ed-4e53-a426-74c38ea32293

    Best regards,

    Chelsea Wu


    Please remember to mark the replies as answers if they helped. If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com.

    SharePoint Server 2019 has been released, you can click here to download it.
    Click here to learn new features. Visit the dedicated forum to share, explore and talk to experts about SharePoint Server 2019.

    Friday, September 27, 2019 9:26 AM
  • If I had to do this I would make two lists. 

    Create an item in the first list. Assign who the contributors are for the this item. Take the item and create it programmatically in the second list by assigning the relevant custom permissions to it. 

    List 1 needs to have custom permissions as well so contributors don't see it at all.

    Don't forget the 50 000 unique scope limit in SPO.

    Sunday, September 29, 2019 8:59 AM
  • Hi Hristo,

    Thanks for the solution.

    Could you please let me know how we can copy the contents of List 1 to List 2.

    Can you please share the complete code or steps for doing it ?

    Thanks,

    Raj

    Tuesday, October 1, 2019 6:52 AM
  • Hi Raj, 

    a preferred way is to use Microsoft flow.

    So this is what needs to happen on a high-level:

    1. Trigger flow when item created in list 1

    2. Create item in list 2

    3. Break permissions inheritance for item in list 2

    4. assign custom permissions to item in list 2 as needed. 

    Finally test via search on the site. You need two users/accounts.

    First account has access everywhere (list 1 + every item in list 2), second account has access to designated items only in list 2. 

    Tuesday, October 1, 2019 11:38 AM
  • Hi Christoff,

    Thanks for your solution.

    But, We are now trying to hide "All Items" through Jquery code by using Script editor web part.

    We will try and let you know the outcome.

    Thanks,

    Raj

    Friday, October 4, 2019 6:49 AM