A little problem with Administrator Widget

Topics: Themes
Feb 13, 2008 at 11:21 AM
Edited Feb 13, 2008 at 11:28 AM
Adminstrator widget only show "Change Password" entry when someone (who is not in role Administrators or Editors.
So I change the widget to
<% if (Page.User.Identity.IsAuthenticated){ %>
  <ux:menu runat="server" ID="uxMenu" />
<%} %>
It is better. But now the widgets only show the title and an empty box.
I can not find a solution, so I delete the widget and go back to my old code in site.master (I use a variant off Cogitation).
If someone know something, please tell me ...
Thanks
Feb 13, 2008 at 6:30 PM

jtentor wrote:
Adminstrator widget only show "Change Password" entry when someone (who is not in role Administrators or Editors.
So I change the widget to
<% if (Page.User.Identity.IsAuthenticated){ %>
  <ux:menu runat="server" ID="uxMenu" />
<%} %>
It is better. But now the widgets only show the title and an empty box.
I can not find a solution, so I delete the widget and go back to my old code in site.master (I use a variant off Cogitation).
If someone know something, please tell me ...
Thanks


In the Page_Load event in widget.ascx.cs of the Administration widget add :

if (!System.Threading.Thread.CurrentPrincipal.Identity.IsAuthenticated)
this.Visible = false;
Feb 13, 2008 at 8:23 PM
Thanks goranh, it works perfect