Quantcast
Channel: SharePoint 2013 - Development and Programming forum
Viewing all articles
Browse latest Browse all 7589

Javascript Script Editor code not showing for non-admin users

$
0
0

Hi I have added a script editor web part in SP 2013 to add the code below to place a status message at the top but it doesn't work for non-admin users. I can see it just fine logged in as the admin on any computer but not as regular users. I know in the past I would have to publish a major version of a page to get the changes to display but I don't know how to do this for a web part. I've published the master page as a major version but still nothing. I found that if I elevate the end users to Contribute level from Read then they can view the message bar so something about this code won't run for a Read permission level.

Is there something I'm missing here? Thanks!!

<script language="javascript" type="text/javascript">
var statusID = ' ';
SP.SOD.executeFunc('sp.js', 'SP.ClientContext', AddStatusMethod);
function AddStatusMethod()
{
this.statusId = SP.UI.Status.addStatus("NewsFlash", "New Message");
SP.UI.Status.setStatusPriColor(this.statusId, "yellow");
}
</script>



Doug S




Viewing all articles
Browse latest Browse all 7589

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>