none
Make documents hidden from Farm and Site Collection admins - is it possible? RRS feed

  • Question

  • Don't You know about the subj? Can I make "super-hidden" library where Farm and Site collection administrators have no access?

    My idea is to create an event receiver(for example on 'created' event) which will break permissions, don't know if it works.

    upd.: I tried to create console app that removes all permissions but it doesn't work for admin accounts:

    public static void DeleteAllPermissions(SPListItem listItem)   

    {        // break inheritance 

          if (!listItem.HasUniqueRoleAssignments) 

    {

            listItem.BreakRoleInheritance(true); 

    // remove all existing permissions   

    while (listItem.RoleAssignments.Count > 0)   

    {

            listItem.RoleAssignments.Remove(0); 

    }   

    Console.WriteLine("OK deleted!");


    So Yes, I think it is wrong and impossible.

    Best regards,
    Gennady




    • Edited by Rockie_ Tuesday, January 24, 2017 11:02 AM
    Tuesday, January 24, 2017 9:24 AM

Answers

  • Check this

    https://social.technet.microsoft.com/Forums/office/en-US/4b397fcc-e147-4b60-9804-3d051e222263/how-to-hide-document-library-from-a-site-collection-admin-and-farm-admins?forum=sharepointadminlegacy

    • Proposed as answer by Victoria XiaModerator Sunday, February 5, 2017 6:48 AM
    • Marked as answer by Rockie_ Monday, February 27, 2017 11:04 AM
    Tuesday, January 24, 2017 12:16 PM