Forum Discussion

GregFletcher1's avatar
GregFletcher1
Copper Contributor
Feb 20, 2023
Solved

How can we restrict the 'all items' view from all users?

We have a master list of all items,  and we've added filtered views for a specific group within our organization.

How do we share the view of the master list of items (all items) without allowing the end user from that group to change the filter view, and create and edit their own items in the list?

  • Hi GregFletcher1 ,

    ah, ok... you are on a list view.

    Go to "Gear"->"Add a page" and add a new Site Page.
    On that page click the "+" in the middle and add the "Lists Webpart"

    Now select your list and press the little pencil at the top of the webpart



    A dialog opens on the right side and you can set the "Show See All Button" and the commandbar to be hidden


    Now press Publish at the top of the page to save that page.



    Now you have a content page containing the list view webpart without the option for a user to switch the view


    Now you can communicate the URL to that page to your users and let them work with that page.

    Best Regards,
    Sven




  • Hello GregFletcher1 

     

    SharePoint views are not permission driven, only the content. It's no setting available for permission driven views.

     

    You can create private views, but only for you. Other option is to use search with filters.

     

    Best, Dave 

    • GregFletcher1's avatar
      GregFletcher1
      Copper Contributor

      Hi DaveMehr365 ,
      First of all, thanks for the reply.
      So, our list is for managing peoples CPD progress etc., and the list is called 'CPD List'.

      We've tried creating a 'MyCPD' view (alongside the 'allitems' view) and then setting the permissions of that list to 'Read items that were created by the user' and 'Create items and edit items that were created by the user' and we've tried setting the view permissions of the 'MyCPD' view to filter to 'show items when name is equal to [ME]' etc., but not one version ever seems to solve the problem!
      The main problem we have is that even if we have set the 'myCPD' view as the default view, end users can always select the 'all items' view and then see everyone else's data... If we make some of the changes mentioned earlier then the admins can't create a list that the end user can see or edit/amend etc... I've been struggling with this for almost a week now and cannot get an answer. To me, this should be a simple thing but alas, apparently not.
      I'm starting to wonder if we should try to find another app or MSFT service that might achieve our desired result..?
      Thanks again.

      • SvenSieverding's avatar
        SvenSieverding
        Bronze Contributor

        Hi GregFletcher1 ,

        You can create a SitePage and add the "Lists" webpart to that page.
        Now you can select the view to be displayed in the setting of the "Lists"-webpart 
        If you uncheck the toggle ""Show See all Button" and save you now have a page with the contents of your list view but with no visible way to change the view.

        But your users will be able to see other entries if they go directly to the list....Or if they use the Lists-App, or the API, or....

        If you don't want that, then you have three options:

        1) Create a Power Automate flow that runs on item update and sets item level permissions for each element. But the usage of item level permissions will get out of hands and will make your list very slow once it grows larger.

        2) Partition the list into multiple lists, each having their own permissions. Then use i.e. the PnP Modern Search Webparts to aggregate all items into a single view (Through the Search API).
        Or create a PowerApp that does that.
        Here you might get problems once you have to move items between these lists. 

        3) Use a Dataverse Table and create a Power App to help your users access the data. With Dataverse Tables you are able to implement row level security (and even field level security if you like).
        But this is also the most complicated solution. And you will have to create many things like forms from scratch.

        Best Regards,
        Sven


Resources