I have been working on our latest initiative this weekend, MOSS Connect. As I was plowing through issues I ran across an article where the author was hiding different page elements from anonymous users with the following tag:

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

[content to be rights-trimmed]

</Sharepoint:SPSecurityTrimmedControl>

 

It occurred to me that I could hide Welcome and Site Action menu from anonymous users in the same way. This is how I did it on MOSS Connect:

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

<table>

<tr>

<!– Login –>

<td>

<wssuc:Welcome id="IdWelcome" runat="server" EnableViewState="false"/>

</td>

<td>

<!– Site Actions Menu –>                                                                            

<PublishingSiteAction:SiteActionMenu runat="server"/>

</td>

</tr>

</table>

</Sharepoint:SPSecurityTrimmedControl>

 

Oh, now you are wondering how you would log in. Just point your browser at a protected page like _layouts/settings.aspx.