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.: Yes, thank You Gautam for response and link to article! 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

up vote 8 down vote accepted

This is not possible. Admins will always have full permission over the entire site collection.

The reality is that with any system somebody has to be the admin, and being the admin means having both privilege and responsibility, and it also means that the users have to not only trust, but believe in their bones that they can trust the admin, and that the admin has to respect and show they deserve that level of trust.

Hide documents from site collection administrators

  • with great power come great responsibility - Oncle Ben :) – Steve B Jan 24 '17 at 11:04

Your Answer

 
discard

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

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