From 9731e56aba304d5c19a87ffa41926f212b78bc44 Mon Sep 17 00:00:00 2001 From: "Samuele E. Locatelli" Date: Tue, 2 May 2017 16:50:07 +0200 Subject: [PATCH] refresh pagina login x test forceUser --- GMW/WebUserControls/mod_login.ascx.cs | 39 +++++++++++---------------- 1 file changed, 16 insertions(+), 23 deletions(-) diff --git a/GMW/WebUserControls/mod_login.ascx.cs b/GMW/WebUserControls/mod_login.ascx.cs index 814fe00f..3dc7ae5d 100644 --- a/GMW/WebUserControls/mod_login.ascx.cs +++ b/GMW/WebUserControls/mod_login.ascx.cs @@ -1,15 +1,7 @@ -using System; -using System.Data; -using System.Configuration; -using System.Collections; -using System.Web; -using System.Web.Security; -using System.Web.UI; -using System.Web.UI.WebControls; -using System.Web.UI.WebControls.WebParts; -using System.Web.UI.HtmlControls; -using SteamWare; using GMW_data; +using SteamWare; +using System; +using System.Web.UI; /// /// classe gestione login e forzatura login @@ -71,7 +63,7 @@ public partial class mod_login : ApplicationUserControl if (fatto) { string postazione_IP = Request.UserHostName; - httpLog(string.Format("L'utente {0} ({1}) ha effettuato il login correttamente dall'IP {2}", _utente.CognomeNome, _utente.userNameAD, postazione_IP), SteamWare.tipoLog.INFO); + httpLog(string.Format("L'utente {0} ({1}) ha effettuato il login correttamente dall'IP {2}", _utente.CognomeNome, _utente.userNameAD, postazione_IP), tipoLog.INFO); Postazione.IP = postazione_IP; Postazione.setupPrinter(); if (Login_ok != null) @@ -82,7 +74,7 @@ public partial class mod_login : ApplicationUserControl else { lblMessage.Text = String.Format("{0}
There are some problems instatiating user: {1}/{2}", user_std.UtSn.Traduci("AccessFail"), dom_user[0], dom_user[1]); - httpLog(String.Format("Accesso fallito, problemi ad istanziare l'utente {0}/{1}", dom_user[0], dom_user[1]), SteamWare.tipoLog.ERROR); + httpLog(String.Format("Accesso fallito, problemi ad istanziare l'utente {0}/{1}", dom_user[0], dom_user[1]), tipoLog.ERROR); if (Login_Error != null) { Login_Error(this, new EventArgs()); @@ -99,7 +91,7 @@ public partial class mod_login : ApplicationUserControl else { lblMessage.Text = String.Format("{0}
user not allowed: {1}/{2}", user_std.UtSn.Traduci("AccessFail"), dom_user[0], dom_user[1]); - httpLog(String.Format("Utente non autorizzato: {0}/{1}", dom_user[0], dom_user[1]), SteamWare.tipoLog.WARNING); + httpLog(String.Format("Utente non autorizzato: {0}/{1}", dom_user[0], dom_user[1]), tipoLog.WARNING); if (Login_Error != null) { Login_Error(this, new EventArgs()); @@ -110,7 +102,7 @@ public partial class mod_login : ApplicationUserControl else { lblMessage.Text = user_std.UtSn.Traduci("AccessFail") + user_std.UtSn.Traduci("UsrNotAuth"); - httpLog(String.Format("Accesso fallito, utente non autenticato"), SteamWare.tipoLog.WARNING); + httpLog(String.Format("Accesso fallito, utente non autenticato"), tipoLog.WARNING); if (Login_Error != null) { Login_Error(this, new EventArgs()); @@ -128,7 +120,7 @@ public partial class mod_login : ApplicationUserControl bool _allowForceUser = false; try { - _allowForceUser = SteamWare.memLayer.ML.cdvb("_allowForceUser"); + _allowForceUser = memLayer.ML.cdvb("_allowForceUser"); } catch { @@ -144,7 +136,7 @@ public partial class mod_login : ApplicationUserControl if (fatto) { string _rigaLog = String.Format("User {0} has forced user identity ok: logged as \t {1}\\{2}", Page.User.Identity.Name, dominio.Text, user.Text); - httpLog(_rigaLog, SteamWare.tipoLog.INFO); + httpLog(_rigaLog, tipoLog.INFO); if (Login_ok != null) { Login_ok(this, new EventArgs()); @@ -153,10 +145,10 @@ public partial class mod_login : ApplicationUserControl } else { - lblMessage.Text = String.Format("{0}
key not allowed for operation!!! operation logged!!!", user_std.UtSn.Traduci("AccessFail")); - mandaEmail(_fromEmail, _adminEmail, "Attenzione: tentativo di accesso non autorizzato!", String.Format("Tentativo di forcing user non autorizzato!
L'utente {0} ha tentato di accedere a {1} forzando l'utente ma la sua key autorizzativa e' sbagliata...", Page.User.Identity.Name, user_std.UtSn.Traduci(SteamWare.memLayer.ML.confReadString("defaultApp")))); + lblMessage.Text = String.Format("{0}
key not permitted!!! operation logged!!!", user_std.UtSn.Traduci("AccessFail")); + mandaEmail(_fromEmail, _adminEmail, "Attenzione: tentativo di accesso non autorizzato!", String.Format("Tentativo di forcing user non autorizzato!
L'utente {0} ha tentato di accedere a {1} forzando l'utente ma la sua key autorizzativa e' sbagliata...", Page.User.Identity.Name, user_std.UtSn.Traduci(memLayer.ML.confReadString("defaultApp")))); string _rigaLog = String.Format("User {0}\t tried to force user - wrong password - he tried to log as \t {1}\\{2}", Page.User.Identity.Name, dominio.Text, user.Text); - httpLog(_rigaLog, SteamWare.tipoLog.WARNING); + httpLog(_rigaLog, tipoLog.WARNING); if (Login_Error != null) { Login_Error(this, new EventArgs()); @@ -165,9 +157,10 @@ public partial class mod_login : ApplicationUserControl } else { - mandaEmail(_fromEmail, _adminEmail, "Attenzione: tentativo di accesso non autorizzato!", String.Format("Tentativo di forcing user non autorizzato!
L'utente {0} ha tentato di accedere a {1} forzando l'utente ma la funzione e' disabilitata...", Page.User.Identity.Name, user_std.UtSn.Traduci(SteamWare.memLayer.ML.confReadString("defaultApp")))); + lblMessage.Text = String.Format("{0}
FORCEUSER not permitted, operation logged!!!", user_std.UtSn.Traduci("AccessFail")); + mandaEmail(_fromEmail, _adminEmail, "Attenzione: tentativo di accesso non autorizzato!", String.Format("Tentativo di forcing user non autorizzato!
L'utente {0} ha tentato di accedere a {1} forzando l'utente ma la funzione e' disabilitata...", Page.User.Identity.Name, user_std.UtSn.Traduci(memLayer.ML.confReadString("defaultApp")))); string _rigaLog = String.Format("User {0}\t tried to force user - access disabled - he tried to log as \t {1}\\{2}", Page.User.Identity.Name, dominio.Text, user.Text); - httpLog(_rigaLog, SteamWare.tipoLog.WARNING); + httpLog(_rigaLog, tipoLog.WARNING); if (Login_Error != null) { Login_Error(this, new EventArgs()); @@ -182,7 +175,7 @@ public partial class mod_login : ApplicationUserControl Login_Error(this, new EventArgs()); } string _rigaLog = String.Format("\t Someone tried to force user - real user: \t - not autenticated - \t tried to log as \t {0}\\{1}", dominio.Text, user.Text); - httpLog(_rigaLog, SteamWare.tipoLog.WARNING); + httpLog(_rigaLog, tipoLog.WARNING); } }