none
how to set read / write security on list using client object model RRS feed

  • Question

  • As we can set the Read and write security on a list programmatically using server object model , u/sing APIs like SPList.ReadSecurity and SPList.WriteSecurity , so was wondering how can we set the same thing using client object model? - using Managed Client object model.


    Bhushan | http://www.passionatetechie.blogspot.com | http://twitter.com/BhushanGawale

    Saturday, June 9, 2012 6:31 PM

All replies

  • Hi

    This thread has sample code showing how to create a document library and set Contribute (Write)  permissions, all done with the Client Object model.  You should be able to modify it to suit your needs:  

    http://social.msdn.microsoft.com/Forums/en-US/sharepoint2010general/thread/fff412b3-4a24-4805-9423-c00ff919ae5c


    Kind Regards Bjoern
    Blog


    Saturday, June 9, 2012 6:47 PM
    Moderator
  • Thanks Bjoern , this sets permissions on the list , but what I am more interested in setting the read and edit access of the list which is in list's advanced settings , as shown in picture above.

    Bhushan | http://www.passionatetechie.blogspot.com | http://twitter.com/BhushanGawale

    Saturday, June 9, 2012 7:13 PM
  • I'm afraid that's the closest you get with the Client Object Model. The Client List class doesn't have any equivalents to ReadSecurity and WriteSecurity. An alternative is to write a web service doing the job on the server when you invoke it from the client.

    Kind Regards Bjoern
    Blog

    Saturday, June 9, 2012 7:22 PM
    Moderator
  • true , but again web service needs to be deployed on the server right? so this doesnt hold true in case of Office365 environment , I tried modifying the Read and Write Security attributes in list's Schema XML but , as this is read only property so cannot set the modified schema XML.

    Bhushan | http://www.passionatetechie.blogspot.com | http://twitter.com/BhushanGawale

    Saturday, June 9, 2012 7:47 PM