2

Working on a public facing SharePoint Foundation 2010 site with anonymous access enabled. Anonymous/authenticated access to content works as expected without problems so far.

Accessing the Blog with anonymous displays an "Alert Me" link on the homepage which, once clicked, opens a login prompt. This is rather confusing to anonymous users hence I want to hide it.

I managed to hide it via CSS but would rather prefer a server-side method.

Digging around I was able to locate the lines in question inside the blog.xsl stylesheet used by the XsltViewWebPart on the startpage.

Does anybody know if it is possible to add a SharePoint SecurityTrimmed control inside the XSLT and what permission would be required to hide the "Alert Me" link for anonymous users?

2
  • Do you mind sharing how you hid the alert me via CSS? or what you did for a solution. I have the same issue.
    – user9170
    Commented Jun 28, 2012 at 13:21
  • I'm in progress moving to another country without having access to my development VM. Please remind me by end of next week once I've settled down. Thanks!
    – Sig Weber
    Commented Jun 28, 2012 at 20:27

2 Answers 2

1

The easier method would be to remove the Create Alerts option form the Read permission level and it won't be an option for users.

Go to Site Actions, Site Settings and click on Site Permissions. In the ribbon click Permission levels. Here you can click on the Read permission and edit it or click the Copy Permission Level button to create a new permission level.

This would allow you to have an authenticated user read only level so they could receive alerts and an anonymous user read permission level with no alerts.

6
  • Sounds good. Will give it a try and post back here. Thanks!
    – Sig Weber
    Commented Nov 14, 2011 at 14:01
  • I seem to be too dumb to figure out how to remove the Create Alerts option form the Read permission level only for anonymous users. Any hint where to look?
    – Sig Weber
    Commented Nov 14, 2011 at 14:20
  • updated response. Commented Nov 14, 2011 at 14:39
  • Thanks for the pointer! Followed your steps but now my authenticated readers don't have the alert link but anonymous still have it :(
    – Sig Weber
    Commented Nov 14, 2011 at 15:03
  • If you created a custom permission, make sure the anon users have that permission level applied to the blog and authenticated users have the default Read permisions at the list level where the alerts should be removed. Commented Nov 14, 2011 at 15:16
0

Create a new parameter to the XSL and retrieve the current user from SharePoint. Then only show the alert IF the paramter has a value.

4
  • Do you have an example how to add the parameter for the current user?
    – Sig Weber
    Commented Nov 15, 2011 at 6:59
  • blogs.msdn.com/b/joshuag/archive/2008/06/03/…
    – websch01ar
    Commented Nov 15, 2011 at 12:08
  • Thanks! But this is for a SharePoint 2007 DataFormWebPart/DataViewWebPart using SharePoint Designer 2007. I'm looking for a way to change the SharePoint 2010 XsltViewWebPart blog.xsl source without SharePoint Designer 2010. How would I apply the info you supplied in that case?
    – Sig Weber
    Commented Nov 15, 2011 at 12:17
  • The concept is the same...I'll create an example and post it to my blog. Give me a few minutes.
    – websch01ar
    Commented Nov 15, 2011 at 13:15

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.