Adding permission to a view (Work around)

Many of the SharePoint developers asked to specify a view permission to specific users, specially in approval process automation, one say ” kindly i need only branch “A” manager to see only the branch requests and shouldn’t navigate other branches requests”, through my experience of such scenarios, the client may ask again to give the same manager extra rights and so on modifications again :S.

Here we can work around this scenario by using this simple steps:

  • In the document library or any other SharePoint content create a view, say for example  my documents which only filter the view of items that i have added.
  • Create a group permission call it ” Selective Audience
  • Now go to any page library or directly create a new web page, and add this document library in the web page like below:

After adding the document library to the page , you will see all the content of the document library (the default view).

Now edit the web part containing the document library, and select your customized view like below:

Don’t click OK yet, select from below advanced tab and at the end you will see “Target Audiences” section, choose your selective group like below and click ok for all:

After saving your work in the web part, if you are not a member in the created group, you will not see anything in the page like below, coz i have logging using (Administrator account), and the created group only contains other account (Hossam account):

And here after login using Hossam account:

Though the document library have two files, but only the web part view the target view we have created in the document library, hence you can control your views in this simple way.


About Hossam Kamal

Hossam Kamal Senior SharePoint Developer with high development skills in C#, ASP.NET, SharePoint Server Technologies, jQuery, CSS, XML, O.O.D, SSRS and MS.SQL Server.
This entry was posted in SharePoint Development, SharePoint General. Bookmark the permalink.

4 Responses to Adding permission to a view (Work around)

  1. Ahmed Eldesokey says:

    Nice post

  2. Ashraf says:

    this helps,thanks.

  3. Kim says:

    If I set the audience permissions on a view, would they be able to access the files in that view if they searched for them?

    • Hossam Kamal says:

      I didn’t test it, but as you know searching can have a target audience too, so you can control your search results, here you are a good tutorial for that:

      Hope that help.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s