I know it can be done with client side coding, but maybe there is a built in way to do this in SharePoint 2013. I have a web part I share with other sites, but do not want site administrators seeing or editing the web part contents through the normal sharepoint page edit UI > Edit Web Part > Edit Snippet.
Might it there be a switch in the webpart xml to disable that?
Possible to create a new or change the web part type that does not have the Edit Snippet feature?
this is the Web Part XML source of a very simple web part anybody with site admin rights on the site can edit via the UI.
<webParts>
<webPart xmlns="http://schemas.microsoft.com/WebPart/v3" Gr="Test">
<metaData>
<type name="Microsoft.SharePoint.WebPartPages.ScriptEditorWebPart, Microsoft.SharePoint, Version=15.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" />
<importErrorMessage>Cannot import this Web Part.</importErrorMessage>
</metaData>
<data>
<properties>
<property name="ExportMode" type="exportmode">None</property>
<property name="HelpUrl" type="string" />
<property name="Hidden" type="bool">False</property>
<property name="Description" type="string">JCP 68 TEST</property>
<property name="Content" type="string">
<H1>HELLO THIS IS A TEST</H1>
</property>
<property name="CatalogIconImageUrl" type="string">/_layouts/images/wp_pers.gif</property>
<property name="Title" type="string">JCP 68 </property>
<property name="AllowHide" type="bool">False</property>
<property name="AllowMinimize" type="bool">False</property>
<property name="AllowZoneChange" type="bool">True</property>
<property name="TitleUrl" type="string" />
<property name="ChromeType" type="chrometype">None</property>
<property name="AllowConnect" type="bool">True</property>
<property name="Width" type="unit" />
<property name="Height" type="unit" />
<property name="HelpMode" type="helpmode">Navigate</property>
<property name="AllowEdit" type="bool">False</property>
<property name="TitleIconImageUrl" type="string" />
<property name="Direction" type="direction">NotSet</property>
<property name="AllowClose" type="bool">False</property>
<property name="ChromeState" type="chromestate">Normal</property>
</properties>
</data>
</webPart>
</webParts>