The MyDetailsController class exposes the CanGenerateMyDetailsNavigationItem static (Shared in VB) field which indicates whether to generate the My Details navigation item. Its value is true by default, i.e the item is generated. If it is required to prohibit generating the My Details navigation item, set CanGenerateMyDetailsNavigationItem to false:
In a Windows Forms application project, add this code to the Main method located in Program.cs (Program.vb) file, before invoking the WinApplication.Start method. In an ASP.NET application project, add this code to the Session_Start method located in Global.asax.cs (Global.asax.vb) file, before invoking the WebApplication.Start method.
In an ASP.NET application, the MyDetailsController Controller adds the MyDetailsAction to the SecurityAction Container. Besides MyDetails, this Action Container includes the Logoff Action.
In the legacy Security System, users can modify themselves, even if the Write access to the User object is denied, by default. Additionally, users can use the MyDetails Navigation Item and Action, when they have no Navigate access to the User object. To change this behavior, you can set the ObjectAccessComparer.AllowModifyCurrentUserObject and ObjectAccessComparer.AllowNavigateToCurrentUserObject properties to false in the Main method of the Windows Forms application or in the Session_Start method of the ASP.NET application. These settings have no effect in the Security System. The required permissions are granted or omitted explicitly (see Client-Side Security (2-Tier Architecture)).
ObjectAccessComparer currentComparer =
// Prohibit changing the current user's properties in My Details Detail View
// for users who have no "Write" permission to User object:
currentComparer.AllowModifyCurrentUserObject = false;
// Hide the My Details Navigation Item and Action
// for users who have no "Navigate" permission to User object:
Dim currentComparer As ObjectAccessComparer = _
' Prohibit changing the current user's properties in My Details Detail View
' for users who have no "Write" permission to User object:
currentComparer.AllowModifyCurrentUserObject = False
' Hide the My Details Navigation Item and Action
' for users who have no "Navigate" permission to User object: