Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

I would like to include a document library in my SharePoint site and make it visible only to a certain group of people. All other content on the web site should remain available to everyone. How can I change the list permissions only for a specific one and not for the whole area??

Thanks.

share|improve this question
add comment

3 Answers 3

The simplest way to do this would be the following:

  1. Open the document library you would like to have unique permissions on
  2. Select the "Library" tab at the top of the page
  3. Located in the ribbon, select "Library Permissions" in the Settings area
  4. On the ribbon, select "Stop Inheriting Permissions"

Please note that when you stop inheriting permissions (also known as breaking permissions), any changes made to your permissions at the top level in the future will NOT take affect to this document library or any other list or library that are not inheriting permissions.

  1. Once you select "Stop Inheriting permissions", add or remove any users or groups that you want to the Libarary. THATS IT!

This is an excellent youtube video which explains permissions very well. http://www.youtube.com/watch?v=kLRO0KLYLcs

share|improve this answer
add comment

You need to break the permission inheritance on said list.

Assuming you already have the list instance referenced in a "targetList" variable, this code will check if the list uses custom permissions and then break the inheritance if required.

if (!targetList.HasUniqueRoleAssignments)
{
    targetList.BreakRoleInheritance(false); 
} 

after that, you simply need to build the specific Role Assignment item that describes the assignment you want to define and add it to the list permission.

SPRoleAssignment roleAssignment = new SPRoleAssignment(......);
SPRoleDefinition roleDefinition = web.RoleDefinitions.GetByType(....);
roleAssignment.RoleDefinitionBindings.Add(roleDefinition);

targetList.RoleAssignments.Add(roleAssignment);

(notice: you can also do the same via the SharePoint UI. Just look for "List Permission" while browsing the list settings. This page provides a step by step visual guide)

share|improve this answer
add comment

My strategy is dependent on the current state of your user security structure, and how you are directing the users to the list/library...e.g. Do you have it displayed on a landing page or Are you directing them to the actual library/list)

I would use a combination of Aaron Chatham's solution listed above, and enable audience targeting for the list/library. For example, if you had the library/list displayed on a landing page then only the assigned group(audience) would be able to view the list/library.

Listed below is a great resource for configuring audience targeting. http://office.microsoft.com/en-us/sharepoint-server-help/target-content-to-specific-audiences-HA010169053.aspx

Happy troubleshooting!

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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