diff --git a/WebSites/WebGIM/Bin/SteamWare.dll b/WebSites/WebGIM/Bin/SteamWare.dll index fbf9e05..1f95f3f 100644 Binary files a/WebSites/WebGIM/Bin/SteamWare.dll and b/WebSites/WebGIM/Bin/SteamWare.dll differ diff --git a/WebSites/WebGIM/Web.config b/WebSites/WebGIM/Web.config index c20cb01..ae5f6e9 100644 --- a/WebSites/WebGIM/Web.config +++ b/WebSites/WebGIM/Web.config @@ -28,7 +28,7 @@ - + diff --git a/WebSites/WebGIM/WebConfigSomaschini_AppSettings.config b/WebSites/WebGIM/WebConfigSomaschini_AppSettings.config index 7aa40df..ae1a703 100644 --- a/WebSites/WebGIM/WebConfigSomaschini_AppSettings.config +++ b/WebSites/WebGIM/WebConfigSomaschini_AppSettings.config @@ -25,11 +25,11 @@ - - - - - + + + + + diff --git a/WebSites/WebGIM/WebConfigSomaschini_ConnectionStrings.config b/WebSites/WebGIM/WebConfigSomaschini_ConnectionStrings.config index 0321ee8..16ac759 100644 --- a/WebSites/WebGIM/WebConfigSomaschini_ConnectionStrings.config +++ b/WebSites/WebGIM/WebConfigSomaschini_ConnectionStrings.config @@ -1,3 +1,3 @@  - + \ No newline at end of file diff --git a/WebSites/WebGIM/autoEnroll.aspx b/WebSites/WebGIM/autoEnroll.aspx new file mode 100644 index 0000000..1e7f2df --- /dev/null +++ b/WebSites/WebGIM/autoEnroll.aspx @@ -0,0 +1,55 @@ +<%@ Page Language="C#" AutoEventWireup="true" CodeFile="autoEnroll.aspx.cs" Inherits="autoEnroll" %> + + + + + + + +
+
+

+ Registrazione nuovo utente +

+ + + + + + + + + + + + + + + + +
+ Cognome: + + + +
+ Nome: + + + +
+ email: + + + +
+ +
+
+
+ + diff --git a/WebSites/WebGIM/autoEnroll.aspx.cs b/WebSites/WebGIM/autoEnroll.aspx.cs new file mode 100644 index 0000000..5f608aa --- /dev/null +++ b/WebSites/WebGIM/autoEnroll.aspx.cs @@ -0,0 +1,35 @@ +using System; +using System.Collections.Generic; +using System.Web; +using System.Web.UI; +using System.Web.UI.WebControls; +using SteamWare; + +public partial class autoEnroll : System.Web.UI.Page +{ + protected void Page_Load(object sender, EventArgs e) + { + + } + protected void btnSave_Click(object sender, EventArgs e) + { + // salva il nuovo utente in anagrafica e gli da i diritti di base + bool answ = false; + string ad_name = Page.User.Identity.Name; + string delimStr = "\\"; + char[] delimiter = delimStr.ToCharArray(); + string[] dom_user = ad_name.Split(delimiter, 2); + answ = user_std.UtSn.creaUtente(dom_user[0], dom_user[1], txtCognome.Text, txtNome.Text, memLayer.ML.confReadstring("autoEnrollCdc"), txtEmail.Text, "999", "-"); + answ = user_std.UtSn.assegnaDirittoUtente(dom_user[1], memLayer.ML.confReadstring("autoEnrollCdc"), memLayer.ML.confReadstring("autoEnrollModulo"), memLayer.ML.confReadstring("autoEnrollFunzione"), ""); + if (answ) + { + SteamWare.logger.lg.scriviLog(String.Format("Registrato nuovo utente con autoenroll: {0}/{1}", dom_user[0], dom_user[1]), SteamWare.tipoLog.INFO); + Response.Redirect("./menu.aspx"); + } + else + { + SteamWare.logger.lg.scriviLog(String.Format("Utente non autorizzato: {0}/{1}", dom_user[0], dom_user[1]), SteamWare.tipoLog.WARNING); + Response.Redirect("./unauthorized.aspx"); + } + } +} diff --git a/WebSites/WebGIM/mod_login.ascx.cs b/WebSites/WebGIM/mod_login.ascx.cs index 0ee38d1..4d834f0 100644 --- a/WebSites/WebGIM/mod_login.ascx.cs +++ b/WebSites/WebGIM/mod_login.ascx.cs @@ -87,12 +87,16 @@ public partial class mod_login : ApplicationUserControl } else { + // rimando al modulo di auto enroll... + Response.Redirect("autoEnroll.aspx"); +#if false lblMessage.Text = String.Format("{0}
user not allowed: {1}/{2}", user_std.UtSn.Traduci("AccessFail"), dom_user[0], dom_user[1]); SteamWare.logger.lg.scriviLog(String.Format("Utente non autorizzato: {0}/{1}", dom_user[0], dom_user[1]), SteamWare.tipoLog.WARNING); if (Login_Error != null) { Login_Error(this, new EventArgs()); - } + } +#endif } } else