Archive for September, 2012

Hide ribbon for Visitors – Using Javascript

This requires you to modify your masterpage just a bit. It's minimal.

In your masterpage, find id="s4-ribbonrow" and add this to it:

style="display:none;"

Then add this after where that div ends

<Sharepoint:SPSecurityTrimmedControl runat="server" Permissions="FullMask">
<script type="text/javascript">
document.getElementById("s4-ribbonrow").style.display = "block";
</script>
</Sharepoint:SPSecurityTrimmedControl>

Your result should be something like this:

<div id="s4-ribbonrow" class="s4-pr s4-ribbonrowhidetitle" style="display:none;">
...
</div>
<Sharepoint:SPSecurityTrimmedControl runat="server" Permissions="FullMask">
<script type="text/javascript">
document.getElementById("s4-ribbonrow").style.display = "block";
</script>
</Sharepoint:SPSecurityTrimmedControl>


This will only allow users with Full Control to see the Ribbon.

Original:

sharepoint.stackexchange.com

Hiding View All Site Content and Recycle Bin in SharePoint 2010

Look for the following element in the MasterPage code:

<SharePoint:UIVersionedContent UIVersion="4" runat="server" id="PlaceHolderQuickLaunchBottomV4">
<ContentTemplate>
<ul class="s4-specialNavLinkList">

Above the bold section, add the following line of code:

<Sharepoint:SPSecurityTrimmedControl runat="server" PermissionsString="ManagePermissions">

Change the blue PermissionsString value to whatever you want. Multiple permissions can be separated with a comma (no spaces). Note it should be a permission your target user(s) do not have, and has to come from this list. Spelling and case-sensitivity is important. Finally, add the closing tag after the SharePoint:UIVersionedContent closing tag:

</SharePoint:UIVersionedContent>
</Sharepoint:SPSecurityTrimmedControl>

Original:
oszakiewski.net/

SharePoint 2010 returns a 503-Service Unavailable HTTP status

An issue I had was the application was stopped and even if I started it, it would stop directly after trying to load the web application.

A domain policy change had impacted the service account running the application pool.

And even though my service account was a local admin on the sharepoint host, I was not able to change my local security policies (secpol.msc).

After some back and forth with the domain admin, including the service account in a security group which had "log on as a batch job" rights resolved the issue.

In short, it may be the case that a domain group policy overrides an essential permission of the application pool accounts called “Log on as a batch job”. Without this permission, the application pool account is not able to run the application pool.

This is the article that finally got me on the path to a fix:

www.lamber.info

How to Change the Site Logo in SharePoint 2010

Great walk though, here:

sharepointadam.com

Return top