Exemplo n.º 1
0
        public PageModel([Import] Box.Composition.Services.IMenuService menus)
        {
            TopMenuItems      = menus.TopMenuItems;
            SettingsMenuItems = menus.SettingsMenuItems;

            if (System.Threading.Thread.CurrentPrincipal is BoxPrincipal)
            {
                UserDisplayName = ((BoxPrincipal)System.Threading.Thread.CurrentPrincipal).DisplayName;
                UserEmail       = ((BoxPrincipal)System.Threading.Thread.CurrentPrincipal).Email;
            }
            else
            {
                UserDisplayName = "";
                UserEmail       = "";
            }
        }
Exemplo n.º 2
0
        public PageModel([Import] Box.Composition.Services.IMenuService menus, [Import] Services.LogService log)
        {
            TopMenuItems      = menus.TopMenuItems;
            SettingsMenuItems = menus.SettingsMenuItems;

            if (System.Threading.Thread.CurrentPrincipal is BoxPrincipal)
            {
                UserDisplayName = ((BoxPrincipal)System.Threading.Thread.CurrentPrincipal).DisplayName;
                UserEmail       = ((BoxPrincipal)System.Threading.Thread.CurrentPrincipal).Email;
            }
            else
            {
                UserDisplayName = "";
                UserEmail       = "";
                log.Log("The user session expired.\nIf you are using Windows Aut, make sure /ADM application Windows Authetication is OFF.\n Only /ADM_NT folder should have Windows Authetication ON.", "Invalid Current Principal: " + System.Threading.Thread.CurrentPrincipal.ToString());
            }
        }