none
Find what groups have access to a given folder RRS feed

  • Question

  • Hi,

    How do i find what groups have access to a given SPFolder using c#?

    Thanks Chris

    Thursday, December 6, 2012 9:16 AM

Answers

  • Hi,

    Look on the side of roleassignement :

    SPList list = SPContext.Current.Web.Lists["Documents"];
    SPFolder folder = list.RootFolder.SubFolders["testFolder"];
    foreach (SPRoleAssignment roleAssignement in folder.Item.RoleAssignments)
    {
              // roleAssignement.Member : SPGroup or SPUser.
    }

    NicoBzh

    • Marked as answer by Chris_UK_120 Thursday, December 6, 2012 10:09 AM
    Thursday, December 6, 2012 9:53 AM