I want to restrict people to edit snippet of script editor webpart in sharepoint 2013. Only developer group should have the access to edit the code. I tried by creating a user group for developers and make them as target audience.

But page itself not visible to the other users. Other user should able to see the page and upload documents to a library using the current page.

2 Answers 2


Place your script in a document library where only the dev. group has contribute permissions, others have only read permission, and refer that script from the web part. Set read-only permission on the web part page itself. BTW. is it a web part page, a wiki page, publishing page, or application page?

  • Hi, I have done like that only. But still the site owner and site administrators group could able to access the documents(my script file) in the document library. :( Nov 13, 2014 at 10:45
  • Sorry, I don't think you can protect any resource against users with such privilages. You should grant those permissions only for users you trust.
    – pholpar
    Nov 13, 2014 at 11:05

Move the script to a js file and place the file in a new document library on your site. Break the permissions on the library and allow Edit permissions for your admins. Remove the script editor web part and replace it with a Content Editor web part referencing the js file

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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