Example #1
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());
            }
        }
Example #2
0
 public LogsController(Services.LogService logService)
 {
     _logService = logService;
 }
Example #3
0
        public void AddLog(AddLogDTO logDetails)
        {
            var logSvc = new Services.LogService();

            logSvc.AddLog(logDetails.Message, logDetails.Details);
        }