Hi guys,

  just wonder if anyone has the code in CSOM or REST to remove all permissions 
from a list item. I have been searching around and tried for a day but not 
succeed.

My code is like:

currentItem.breakRoleInheritance(true, false);
        roleAssgn = currentItem.get_roleAssignments();

        for (r in roleAssgn) {
            Assgn = roleAssgn[r];
            Assgn.DeleteObject;
       }
currentcontext.executeQueryAsync(onGetAssignmentsSucceeded, 
onGetAssignmentsFailed);

The code runs without error but it didn't remove the permissions. I can grant 
permission without issue.

Cheers

Ken
                                          
_______________________________________________
Sponsored by Infotext - Amazing Search for Microsoft SharePoint - 
http://www.infotext.com/
ozmoss mailing list
ozmoss@ozmoss.com
http://prdlxvm0001.codify.net/mailman/listinfo/ozmoss

Reply via email to