2

Suppose I create a group "XYZ" who has full control on site . I will break permission inheritance of rootfolders (from folder starting with A to J) inside document library "abc" and assign a "XYZ" group with full control permissions to those folders.

My questions are

  1. Do other group having full control permission would still be able to access it ?
  2. How to make those folders accessible only to XYZ group and not others having full Control permissions.
6

Those groups will not be able to access the folders if the permission for the folder is broken and only the group "XYZ" has permissions to the folder and rest all are removed.

UPDATE

Sample powershell code:

$folders = $list.Folders
foreach ($spFolder in $folders)
{   
    $PermissionLevel = "PermissionName" ;
    $group = $web.SiteGroups[$GroupName];   
    $spFolder.BreakRoleInheritance($false);
    $roleAssignment = New-Object microsoft.sharepoint.SPRoleAssignment($group);
    $roleDefinition = $web.RoleDefinitions[$PermissionLevel];
    $roleAssignment.RoleDefinitionBindings.Add($roleDefinition);   
    $spFolder.RoleAssignments.Add($roleAssignment);       
    $spFolder.Update();   
}
  • ok. how do I achieve it using powershell? other full control groups also wont have access to it? – SharePointMan Mar 18 '14 at 9:22
  • See my updated answer – Nadeem Yousuf Mar 18 '14 at 9:34
  • Your code will break inheritance of all folders from list. I want to break from root level selective folders only – SharePointMan Mar 18 '14 at 9:40
  • 1
    You need to add logic for that. The code simply demonstrates how to break permissions on a folder and add group to it. You should not rely on spoon feeding. – Nadeem Yousuf Mar 18 '14 at 9:42
  • I tested it but it seems that it is still visible to other groups having full control – SharePointMan Mar 18 '14 at 10:38

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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