locked
Setting advanced item level permissions... RRS feed

  • Question

  • I would like to know if this is somehow possible: Let's say I have a list with a content type that contains a user field in the format of DOMAIN\USER. I want to setup a new permission level that assigns custom priviledges to all items in this list based on this field if the current user logged in == user field in the item. Is this possible? I want to get away from setting item level permissions for each item if I have hundreds of them - also something wierd keeps happening and I keep losing these item level permissions that I assigned to a single user. Also, each item in the list represents a person and the content type is a "person".

    Wednesday, July 14, 2010 4:00 PM

Answers

  • If your really eager to do this I think you can by making a custom membership provider with some configuration.

    pseudo-code...

    if(ThingImTryingToAccess == ListImSecuring)

    {

        // SPQuery as admin and give the yay/nay based on some field value.
    }

    else

    {

        // Use OOTB SharePoint security methods
    }

    This is ambitious. Good Luck

    • Marked as answer by igor92128 Friday, July 16, 2010 1:47 AM
    Thursday, July 15, 2010 1:05 AM

All replies

  • If your really eager to do this I think you can by making a custom membership provider with some configuration.

    pseudo-code...

    if(ThingImTryingToAccess == ListImSecuring)

    {

        // SPQuery as admin and give the yay/nay based on some field value.
    }

    else

    {

        // Use OOTB SharePoint security methods
    }

    This is ambitious. Good Luck

    • Marked as answer by igor92128 Friday, July 16, 2010 1:47 AM
    Thursday, July 15, 2010 1:05 AM
  • Allow me to refine my answer because I actually tried it today. You want a Custom RoleProvider instead of a custom MembershipProvider. Oops. The real problem I think you will have is that you will still need Item level permissions; you would just set your custom role to have the item level permission instead of a sharepoint user or group. So the benefit is questionable.
    Sunday, July 18, 2010 1:19 AM