Hello,
I've got a Document Library with seven Documents I want to set the same unique permissions for each document in it. I'm trying to make it so that a SharePoint Group, I have created through JavaScript procedures (JSOM), can be given specific rights to full control over the document(s), while everyone else only has ReadOnly rights.
I've looked into try to break Role Permissions. I found this link, that looked like it might be useful for breaking Inheritance:
http://sharepoint.stackexchange.com/questions/118070/assigning-folder-permissions-with-jsom
but it all seems to go OK, except I get an error once it reaches the
console.log(String.format('Folder {0} has unique permissions',folderItem.get_item('Title')));saying
the item has not been initialized.
I am also having to put these calls into a sp.sod.executefunc('sp.js' 'sp.clientcontext', ... function to get them to execute properly.
Does anyone have any suggestions on a good or better way to do what I am trying to get done? I also need to know how to go about setting the permissions for the documents. But I've been trying to break the inheritance first.
I'll be honest, that I am better with REST API/AJAX calls than I am with the executeQueryAsync calls, but I'm willing to try any way to get this done.
Thanks in advance.