diff --git a/WebSCR/NuovoImpegno.aspx b/WebSCR/NuovoImpegno.aspx new file mode 100644 index 0000000..ff6237a --- /dev/null +++ b/WebSCR/NuovoImpegno.aspx @@ -0,0 +1,5 @@ +<%@ Page Title="" Language="C#" MasterPageFile="~/JQMob.Master" AutoEventWireup="true" CodeBehind="NuovoImpegno.aspx.cs" Inherits="WebSCR.NuovoImpegno" %> + + + + diff --git a/WebSCR/NuovoImpegno.aspx.cs b/WebSCR/NuovoImpegno.aspx.cs new file mode 100644 index 0000000..8232754 --- /dev/null +++ b/WebSCR/NuovoImpegno.aspx.cs @@ -0,0 +1,17 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Web; +using System.Web.UI; +using System.Web.UI.WebControls; + +namespace WebSCR +{ + public partial class NuovoImpegno : System.Web.UI.Page + { + protected void Page_Load(object sender, EventArgs e) + { + + } + } +} \ No newline at end of file diff --git a/WebSCR/NuovoImpegno.aspx.designer.cs b/WebSCR/NuovoImpegno.aspx.designer.cs new file mode 100644 index 0000000..5f72ca6 --- /dev/null +++ b/WebSCR/NuovoImpegno.aspx.designer.cs @@ -0,0 +1,17 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace WebSCR +{ + + + public partial class NuovoImpegno + { + } +} diff --git a/WebSCR/Squadre.aspx b/WebSCR/Squadre.aspx new file mode 100644 index 0000000..f0a423a --- /dev/null +++ b/WebSCR/Squadre.aspx @@ -0,0 +1,5 @@ +<%@ Page Title="" Language="C#" MasterPageFile="~/JQMob.Master" AutoEventWireup="true" CodeBehind="Squadre.aspx.cs" Inherits="WebSCR.Squadre" %> + + + + diff --git a/WebSCR/Squadre.aspx.cs b/WebSCR/Squadre.aspx.cs new file mode 100644 index 0000000..bef6618 --- /dev/null +++ b/WebSCR/Squadre.aspx.cs @@ -0,0 +1,17 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Web; +using System.Web.UI; +using System.Web.UI.WebControls; + +namespace WebSCR +{ + public partial class Squadre : System.Web.UI.Page + { + protected void Page_Load(object sender, EventArgs e) + { + + } + } +} \ No newline at end of file diff --git a/WebSCR/Squadre.aspx.designer.cs b/WebSCR/Squadre.aspx.designer.cs new file mode 100644 index 0000000..426117b --- /dev/null +++ b/WebSCR/Squadre.aspx.designer.cs @@ -0,0 +1,17 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace WebSCR +{ + + + public partial class Squadre + { + } +} diff --git a/WebSCR/UserAdmin.aspx b/WebSCR/UserAdmin.aspx new file mode 100644 index 0000000..ce2ce18 --- /dev/null +++ b/WebSCR/UserAdmin.aspx @@ -0,0 +1,24 @@ +<%@ Page Title="" Language="C#" MasterPageFile="~/JQMob.Master" AutoEventWireup="true" CodeBehind="UserAdmin.aspx.cs" Inherits="WebSCR.UserAdmin" %> + +<%@ Register Src="WebUserControls/mod_enrollByEmail.ascx" TagName="mod_enrollByEmail" TagPrefix="uc2" %> + +<%@ Register Src="WebUserControls/mod_elencoRichResetUtenti.ascx" TagName="mod_elencoRichResetUtenti" TagPrefix="uc3" %> + +<%@ Register src="WebUserControls/mod_enrollByAuthKey.ascx" tagname="mod_enrollByAuthKey" tagprefix="uc4" %> + + + + +
+

Gestione Accesso WebSCR

+ Attenzione, se non è possibile accedere all'applicazione prego richiedere autorizzazione al responsabile del progetto. +
+ +
+ +
+
+

Admin Task

+ +
+
diff --git a/WebSCR/UserAdmin.aspx.cs b/WebSCR/UserAdmin.aspx.cs new file mode 100644 index 0000000..64c4551 --- /dev/null +++ b/WebSCR/UserAdmin.aspx.cs @@ -0,0 +1,45 @@ +using SteamWare; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Web; +using System.Web.UI; +using System.Web.UI.WebControls; +using SteamWare; + +namespace WebSCR +{ + public partial class UserAdmin : System.Web.UI.Page + { + protected void Page_Load(object sender, EventArgs e) + { + // check visibilità controlli opzionali + checkVisibCtrl(); + } + + private void checkVisibCtrl() + { + // controllo se c'è chiamata x aggiungere device da authKey e mostro panel... + mod_enrollByAuthKey1.Visible = (Request.QueryString["addDeviceByKey"] == "lvabe"); + // se è admin vede anche i controlli x abilitare richieste utenti & co... + divAdmin.Visible = userIsAdmin; + divUnauth.Visible=!userIsAdmin; + } + + public bool userIsAdmin + { + get + { + bool answ = false; + try + { + answ = devicesAuthProxy.stObj.userHasRight("SuperAdmin"); + } + catch + { } + return answ; + } + } + + } +} \ No newline at end of file diff --git a/WebSCR/UserAdmin.aspx.designer.cs b/WebSCR/UserAdmin.aspx.designer.cs new file mode 100644 index 0000000..554451a --- /dev/null +++ b/WebSCR/UserAdmin.aspx.designer.cs @@ -0,0 +1,60 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace WebSCR { + + + public partial class UserAdmin { + + /// + /// divUnauth control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.HtmlControls.HtmlGenericControl divUnauth; + + /// + /// mod_enrollByAuthKey1 control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::WebSCR.WebUserControls.mod_enrollByAuthKey mod_enrollByAuthKey1; + + /// + /// mod_enrollByEmail1 control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::WebSCR.WebUserControls.mod_enrollByEmail mod_enrollByEmail1; + + /// + /// divAdmin control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.HtmlControls.HtmlGenericControl divAdmin; + + /// + /// mod_elencoRichResetUtenti1 control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::WebSCR.WebUserControls.mod_elencoRichResetUtenti mod_elencoRichResetUtenti1; + } +} diff --git a/WebSCR/Web.config b/WebSCR/Web.config index ed9a46b..8337c68 100644 --- a/WebSCR/Web.config +++ b/WebSCR/Web.config @@ -8,8 +8,42 @@
- - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - + + + + + + + + + - + + - + - + + - + + @@ -76,7 +118,7 @@ - --> + --> diff --git a/WebSCR/WebSCR.csproj b/WebSCR/WebSCR.csproj index 69ebc4f..fa3d9e4 100644 --- a/WebSCR/WebSCR.csproj +++ b/WebSCR/WebSCR.csproj @@ -318,8 +318,10 @@ + + @@ -329,9 +331,15 @@ - - - + + + + + + + + + @@ -353,6 +361,13 @@ Default.aspx + + ElencoImpegni.aspx + ASPXCodeBehind + + + ElencoImpegni.aspx + Global.asax @@ -363,6 +378,13 @@ JQMob.Master + + NuovoImpegno.aspx + ASPXCodeBehind + + + NuovoImpegno.aspx + Site.Mobile.Master @@ -371,6 +393,20 @@ Site.Mobile.Master + + Squadre.aspx + ASPXCodeBehind + + + Squadre.aspx + + + UserAdmin.aspx + ASPXCodeBehind + + + UserAdmin.aspx + ViewSwitcher.ascx ASPXCodeBehind @@ -378,25 +414,53 @@ ViewSwitcher.ascx - + + mod_elencoRichResetUtenti.ascx + ASPXCodeBehind + + + mod_elencoRichResetUtenti.ascx + + + mod_enrollByAuthKey.ascx + ASPXCodeBehind + + + mod_enrollByAuthKey.ascx + + + mod_enrollByEmail.ascx + ASPXCodeBehind + + + mod_enrollByEmail.ascx + + + mod_enrollByJumperAuthKey.ascx + ASPXCodeBehind + + + mod_enrollByJumperAuthKey.ascx + + mod_fileUpload.ascx ASPXCodeBehind - + mod_fileUpload.ascx - + mod_footer.ascx ASPXCodeBehind - + mod_footer.ascx - + mod_header.ascx ASPXCodeBehind - + mod_header.ascx diff --git a/WebSCR/WebUserControls/mod_elencoRichResetUtenti.ascx b/WebSCR/WebUserControls/mod_elencoRichResetUtenti.ascx new file mode 100644 index 0000000..119dd19 --- /dev/null +++ b/WebSCR/WebUserControls/mod_elencoRichResetUtenti.ascx @@ -0,0 +1,86 @@ +<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="mod_elencoRichResetUtenti.ascx.cs" Inherits="WebSCR.WebUserControls.mod_elencoRichResetUtenti" %> + + + + + + + + + + + + + + + +
+ <%----%> + +
+
+ + + +
+ + + + + +
+ +
+
+ + +
+ + +
+
+
+ + +
+ + + +
+
+
+ + + + + + + +
+ + + +
+
+
+
+ +
+ +
+
+

Spiegazione

+ Ogni riga rappresenta un utente, se questo è indicato con un font barrato significa che l'utente è disattivato e tutti i suoi devices (eventualmente registrati) sono stati disabilitati e rimossi dal DB (e non possono più accedere alla piattaforma). +
+ Partendo da sinistra verso destra abbiamo: +
+
    + <%--
  • seleziona l'utente per visualizzare i devices lui associati
  • +
  • seleziona l'utente per modificare i dati quali cognome, nome, email
  • --%> +
  • Attivazione: il pulsante disattiva un utente (ed i relativi devices) mentre il pulsante lo riattiva (generando una NUOVA AuthKey) e permette nuovi enroll dei dispositivi.
  • +
  • NumAuth: indica il numero di attivazioni residue per l'utente, si possono incrementare/decrementare con i button e
  • +
  • Grp: indica il gruppo di appartenenza dell'utente
  • +
  • Reset: permette di gestire le richieste di supporto: col pulsante si possono approvare (generando una nuova auth key), con si possono rifiutare le richieste e con si possono inviare (per gli utenti ATTIVI) le email contenenti i link per autorizzare i dispositivi; nb: numAuth deve essere maggiore di zero altrimenti un link valido non permette comunque l'attivazione di nuovi devices utente.
  • +
+
+
diff --git a/WebSCR/WebUserControls/mod_elencoRichResetUtenti.ascx.cs b/WebSCR/WebUserControls/mod_elencoRichResetUtenti.ascx.cs new file mode 100644 index 0000000..c7b8e06 --- /dev/null +++ b/WebSCR/WebUserControls/mod_elencoRichResetUtenti.ascx.cs @@ -0,0 +1,135 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Web; +using System.Web.UI; +using System.Web.UI.WebControls; +using SteamWare; + +namespace WebSCR.WebUserControls +{ + public partial class mod_elencoRichResetUtenti : System.Web.UI.UserControl + { + protected void Page_Load(object sender, EventArgs e) + { + //if (!Page.IsPostBack) + //{ + //} + } + /// + /// ultimo comando letto da link button + /// + public string lastCmd { get; set; } + /// + /// gestione evento novo record + /// + /// + /// + protected void btnNew_Click(object sender, EventArgs e) + { +#if false + // richiamo pagina di edit senza parametri x metodo NEW + Response.Redirect("AccettazioneEdit"); +#endif + } + public bool toBool(object value) + { + bool answ = false; + try + { + answ = Convert.ToBoolean(value); + } + catch + { } + return answ; + } + /// + /// evento selezione paziente... + /// + /// + /// + protected void grView_SelectedIndexChanged(object sender, EventArgs e) + { + // recupero dati utente... + string USER_NAME = ""; + try + { + USER_NAME = grView.SelectedDataKey["USER_NAME"].ToString(); + } + catch + { } + if (USER_NAME != "") + { + switch (lastCmd) + { + case "+1": + devicesAuthProxy.stObj.taUtenti.UpdateNumAuth(1, USER_NAME); + break; + case "-1": + devicesAuthProxy.stObj.taUtenti.UpdateNumAuth(-1, USER_NAME); + break; + case "Disattiva": + case "Attiva": + devicesAuthProxy.stObj.taUtenti.ToggleAttivo(SteamwareStrings.pseudoRandomString(20), USER_NAME); + break; + case "NoReset": + devicesAuthProxy.stObj.taUtenti.rejectResetAK(USER_NAME); + break; + case "ResetKeyAndDevices": + devicesAuthProxy.stObj.taUtenti.ResetKeyAndDevices(SteamwareStrings.pseudoRandomString(20), USER_NAME); + break; + case "SendMail": + // cerco chiave... + string AuthKey = ""; + try + { + AuthKey = devicesAuthProxy.stObj.taUtenti.getByEmail(USER_NAME)[0].authKey; + } + catch + { } + if (USER_NAME != "" && AuthKey != "") + { + // invio email! + devicesAuthProxy.stObj.sendEmailAuthKey(USER_NAME, AuthKey); + } + break; + default: + break; + } + } + grView.DataBind(); +#if false + // recupero dati paziente... + int IdxPaziente = 0; + try + { + IdxPaziente = Convert.ToInt32(grView.SelectedDataKey["IdxPaziente"]); + memLayer.ML.setSessionVal("IdxPaziente", IdxPaziente); + DS_Applicazione.AnagPazientiRow riga = DtProxy.man.taAP.getByKey(IdxPaziente)[0]; + memLayer.ML.setSessionVal("Paziente", string.Format("{0} {1} ({2:dd/MM/yyyy})", riga.Cognome, riga.Nome, riga.DataNasc)); + } + catch + { } + if (lastCmd == "edit") + { + // richiamo pagina con edit del record richiesto + Response.Redirect(string.Format("AccettazioneEdit?IdxPaziente={0}", grView.SelectedDataKey["IdxPaziente"])); + } + else if (lastCmd == "select") + { + // se utente abilitato ad accesso privilegiato + if (false) // !!!FARE controllo livello accesso + { + Response.Redirect("Visite"); + } + } +#endif + } + + protected void grView_RowCommand(object sender, GridViewCommandEventArgs e) + { + // salvo il command argument... + lastCmd = e.CommandArgument.ToString(); + } + } +} \ No newline at end of file diff --git a/WebSCR/WebUserControls/mod_elencoRichResetUtenti.ascx.designer.cs b/WebSCR/WebUserControls/mod_elencoRichResetUtenti.ascx.designer.cs new file mode 100644 index 0000000..ce1ba9d --- /dev/null +++ b/WebSCR/WebUserControls/mod_elencoRichResetUtenti.ascx.designer.cs @@ -0,0 +1,33 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace WebSCR.WebUserControls { + + + public partial class mod_elencoRichResetUtenti { + + /// + /// grView control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.GridView grView; + + /// + /// ods control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.ObjectDataSource ods; + } +} diff --git a/WebSCR/WebUserControls/mod_enrollByAuthKey.ascx b/WebSCR/WebUserControls/mod_enrollByAuthKey.ascx new file mode 100644 index 0000000..f2f9e40 --- /dev/null +++ b/WebSCR/WebUserControls/mod_enrollByAuthKey.ascx @@ -0,0 +1,14 @@ +<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="mod_enrollByAuthKey.ascx.cs" + Inherits="WebSCR.WebUserControls.mod_enrollByAuthKey" %> + +
+

Registrazione da Auth Key

+ + + + +
+

Spiegazione

+ Questa funzione permette di inserire un devices tra quelli gestiti tramite digitazione della AuthKey personale (MD5 o meno se abilitato, da richiedere all'admin se non nota). +
+
diff --git a/WebSCR/WebUserControls/mod_enrollByAuthKey.ascx.cs b/WebSCR/WebUserControls/mod_enrollByAuthKey.ascx.cs new file mode 100644 index 0000000..499820d --- /dev/null +++ b/WebSCR/WebUserControls/mod_enrollByAuthKey.ascx.cs @@ -0,0 +1,59 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Web; +using System.Web.UI; +using System.Web.UI.WebControls; +using SteamWare; +using WebSCR_data; + +namespace WebSCR.WebUserControls +{ + public partial class mod_enrollByAuthKey : System.Web.UI.UserControl + { + protected void Page_Load(object sender, EventArgs e) + { + + } + + /// + /// richiesta enroll device da chiave personale + email + /// + /// + /// + protected void btnEnrollByAK_Click(object sender, EventArgs e) + { + // controllo email & co... + string email = txtEmailAK.Text.Trim(); + string authKey = txtAuthKey.Text.Trim(); + if (email != "" && email.IndexOf("@") > 0) + { + // ora controllo che l'email SIA nell'elenco delle email degli utenti... + if (devicesAuthProxy.stObj.checkUserEmail(email)) + { + // controllo se la authKey è corretta x utente... + if (devicesAuthProxy.stObj.checkUserEmailAK(email, authKey)) + { + // rimando al jumper... + Response.Redirect(string.Format("jumper?UserAuthkey={0}&USER_NAME={1}", authKey, email)); + } + else + { + lblOutRegAuthKey.Text = "Attenzione! auth key NON valida, prego contattare amministratore!"; + lblOutRegAuthKey.Visible = true; + } + } + else + { + lblOutRegAuthKey.Text = "Attenzione! email non trovata, prego contattare amministratore!"; + lblOutRegAuthKey.Visible = true; + } + } + else + { + lblOutRegAuthKey.Text = "Attenzione! preogo inserire email valida!"; + lblOutRegAuthKey.Visible = true; + } + } + } +} \ No newline at end of file diff --git a/WebSCR/WebUserControls/mod_enrollByAuthKey.ascx.designer.cs b/WebSCR/WebUserControls/mod_enrollByAuthKey.ascx.designer.cs new file mode 100644 index 0000000..7d055e6 --- /dev/null +++ b/WebSCR/WebUserControls/mod_enrollByAuthKey.ascx.designer.cs @@ -0,0 +1,51 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace WebSCR.WebUserControls { + + + public partial class mod_enrollByAuthKey { + + /// + /// txtEmailAK control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.TextBox txtEmailAK; + + /// + /// txtAuthKey control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.TextBox txtAuthKey; + + /// + /// btnEnrollByAK control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.Button btnEnrollByAK; + + /// + /// lblOutRegAuthKey control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.Label lblOutRegAuthKey; + } +} diff --git a/WebSCR/WebUserControls/mod_enrollByEmail.ascx b/WebSCR/WebUserControls/mod_enrollByEmail.ascx new file mode 100644 index 0000000..2ff886a --- /dev/null +++ b/WebSCR/WebUserControls/mod_enrollByEmail.ascx @@ -0,0 +1,13 @@ +<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="mod_enrollByEmail.ascx.cs" + Inherits="WebSCR.WebUserControls.mod_enrollByEmail" %> + +
+

Richiesta Reset Chiave Personale

+ + + +
+

Spiegazione

+ Con questa procedura l'utente richiede il reset della propria chiave di autenticazione personale. L'amministratore della piattaforma valuterà e validata la richiesta annullerà le chiavi emesse per i devices eventualmente già autorizzati ed inoltrerà, all'indirizzo email dell'utente, la nuova chiave da utilizzare per abilitare i devices desiderati. +
+
diff --git a/WebSCR/WebUserControls/mod_enrollByEmail.ascx.cs b/WebSCR/WebUserControls/mod_enrollByEmail.ascx.cs new file mode 100644 index 0000000..19e7f7e --- /dev/null +++ b/WebSCR/WebUserControls/mod_enrollByEmail.ascx.cs @@ -0,0 +1,50 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Web; +using System.Web.UI; +using System.Web.UI.WebControls; +using SteamWare; +using WebSCR_data; + +namespace WebSCR.WebUserControls +{ + public partial class mod_enrollByEmail : System.Web.UI.UserControl + { + protected void Page_Load(object sender, EventArgs e) + { + + } + /// + /// richiesta reset dispositivi utente + /// + /// + /// + protected void btnReqNewKey_Click(object sender, EventArgs e) + { + // controllo email & co... + string email = txtEmailReq.Text.Trim(); + if (email != "" && email.IndexOf("@") > 0) + { + // ora controllo che l'email SIA nell'elenco delle email degli utenti... + if (devicesAuthProxy.stObj.checkUserEmail(email)) + { + // registro richiesta reset ed invio email ad admin... + devicesAuthProxy.stObj.reqResetAuthKey(email, memLayer.ML.confReadString("adminEmail")); + lblOutUnauth.Text = "Richiesta inoltrata all'amministratore, attendere sua risposta alla casella email indicata."; + lblOutUnauth.Visible = true; + } + else + { + lblOutUnauth.Text = "Attenzione! email non trovata, prego contattare amministratore!"; + lblOutUnauth.Visible = true; + } + } + else + { + lblOutUnauth.Text = "Attenzione! preogo inserire email valida!"; + lblOutUnauth.Visible = true; + } + } + } +} \ No newline at end of file diff --git a/WebSCR/WebUserControls/mod_enrollByEmail.ascx.designer.cs b/WebSCR/WebUserControls/mod_enrollByEmail.ascx.designer.cs new file mode 100644 index 0000000..01de8d5 --- /dev/null +++ b/WebSCR/WebUserControls/mod_enrollByEmail.ascx.designer.cs @@ -0,0 +1,42 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace WebSCR.WebUserControls { + + + public partial class mod_enrollByEmail { + + /// + /// txtEmailReq control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.TextBox txtEmailReq; + + /// + /// btnReqNewKey control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.Button btnReqNewKey; + + /// + /// lblOutUnauth control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.Label lblOutUnauth; + } +} diff --git a/WebSCR/WebUserControls/mod_enrollByJumperAuthKey.ascx b/WebSCR/WebUserControls/mod_enrollByJumperAuthKey.ascx new file mode 100644 index 0000000..8de262b --- /dev/null +++ b/WebSCR/WebUserControls/mod_enrollByJumperAuthKey.ascx @@ -0,0 +1,2 @@ +<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="mod_enrollByJumperAuthKey.ascx.cs" Inherits="WebSCR.WebUserControls.mod_enrollByJumperAuthKey" %> +<%--è una procedura automatica, niente elementi grafici!--%> diff --git a/WebSCR/WebUserControls/mod_enrollByJumperAuthKey.ascx.cs b/WebSCR/WebUserControls/mod_enrollByJumperAuthKey.ascx.cs new file mode 100644 index 0000000..5df45ec --- /dev/null +++ b/WebSCR/WebUserControls/mod_enrollByJumperAuthKey.ascx.cs @@ -0,0 +1,68 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Web; +using System.Web.UI; +using System.Web.UI.WebControls; +using SteamWare; +using WebSCR_data; + +namespace WebSCR.WebUserControls +{ + public partial class mod_enrollByJumperAuthKey : System.Web.UI.UserControl + { + protected void Page_Load(object sender, EventArgs e) + { + // procedo alla ricerca di dati via sessione x User AuthKey + tryAutoEnroll(); + } + /// + /// prova a fare auto enroll + /// + public void tryAutoEnroll() + { + // recupero dati da session + string UserAuthKey = ""; + string email = ""; + string userAgent = ""; + bool fatto = false; + string DeviceName = ""; + string IPv4 = ""; + try + { + //UserAuthKey = memLayer.ML.StringSessionObj("UserAuthkey"); + //email = memLayer.ML.StringSessionObj("email"); + UserAuthKey = Request["UserAuthkey"]; + email = Request["USER_NAME"]; + userAgent = Request.UserAgent; + } + catch + { } + // se ci sono i dati effettua tentativo di AutoEnroll del device + if (email != "" && UserAuthKey != "") + { + IPv4 = Request.UserHostAddress; + DeviceName = SteamWare.dnsUtils.ReverseLookup(IPv4); + //DeviceName = SteamWare.dnsUtils.DetermineCompName(IPv4); // WIN2012R2SAM + //DeviceName = Request.UserHostName; // ::1 + + // prova ad usare la chiave DECODIFICATA x autorizzare device + fatto = devicesAuthProxy.stObj.enrollDevice(devicesAuthProxy.decodeKey(UserAuthKey), IPv4, DeviceName, userAgent, email); + // se NON ce l'ha fatta ed è abilitata l'autenticazione "plain" cerca di eseguire anche quella... + if (memLayer.ML.confReadBool("enablePlain") && !fatto) + { + fatto = devicesAuthProxy.stObj.enrollDevice(UserAuthKey, IPv4, DeviceName, userAgent, email); + } + if (fatto) + { + Response.Redirect("Default"); + } + else + { + Response.Redirect("UserAdmin"); + } + } + } + + } +} \ No newline at end of file diff --git a/WebSCR/WebUserControls/mod_enrollByJumperAuthKey.ascx.designer.cs b/WebSCR/WebUserControls/mod_enrollByJumperAuthKey.ascx.designer.cs new file mode 100644 index 0000000..b011714 --- /dev/null +++ b/WebSCR/WebUserControls/mod_enrollByJumperAuthKey.ascx.designer.cs @@ -0,0 +1,17 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace WebSCR.WebUserControls +{ + + + public partial class mod_enrollByJumperAuthKey + { + } +} diff --git a/WebSCR/WebUserControl/mod_fileUpload.ascx b/WebSCR/WebUserControls/mod_fileUpload.ascx similarity index 100% rename from WebSCR/WebUserControl/mod_fileUpload.ascx rename to WebSCR/WebUserControls/mod_fileUpload.ascx diff --git a/WebSCR/WebUserControl/mod_fileUpload.ascx.cs b/WebSCR/WebUserControls/mod_fileUpload.ascx.cs similarity index 100% rename from WebSCR/WebUserControl/mod_fileUpload.ascx.cs rename to WebSCR/WebUserControls/mod_fileUpload.ascx.cs diff --git a/WebSCR/WebUserControl/mod_fileUpload.ascx.designer.cs b/WebSCR/WebUserControls/mod_fileUpload.ascx.designer.cs similarity index 100% rename from WebSCR/WebUserControl/mod_fileUpload.ascx.designer.cs rename to WebSCR/WebUserControls/mod_fileUpload.ascx.designer.cs diff --git a/WebSCR/WebUserControl/mod_footer.ascx b/WebSCR/WebUserControls/mod_footer.ascx similarity index 100% rename from WebSCR/WebUserControl/mod_footer.ascx rename to WebSCR/WebUserControls/mod_footer.ascx diff --git a/WebSCR/WebUserControl/mod_footer.ascx.cs b/WebSCR/WebUserControls/mod_footer.ascx.cs similarity index 100% rename from WebSCR/WebUserControl/mod_footer.ascx.cs rename to WebSCR/WebUserControls/mod_footer.ascx.cs diff --git a/WebSCR/WebUserControl/mod_footer.ascx.designer.cs b/WebSCR/WebUserControls/mod_footer.ascx.designer.cs similarity index 100% rename from WebSCR/WebUserControl/mod_footer.ascx.designer.cs rename to WebSCR/WebUserControls/mod_footer.ascx.designer.cs diff --git a/WebSCR/WebUserControl/mod_header.ascx b/WebSCR/WebUserControls/mod_header.ascx similarity index 100% rename from WebSCR/WebUserControl/mod_header.ascx rename to WebSCR/WebUserControls/mod_header.ascx diff --git a/WebSCR/WebUserControl/mod_header.ascx.cs b/WebSCR/WebUserControls/mod_header.ascx.cs similarity index 100% rename from WebSCR/WebUserControl/mod_header.ascx.cs rename to WebSCR/WebUserControls/mod_header.ascx.cs diff --git a/WebSCR/WebUserControl/mod_header.ascx.designer.cs b/WebSCR/WebUserControls/mod_header.ascx.designer.cs similarity index 100% rename from WebSCR/WebUserControl/mod_header.ascx.designer.cs rename to WebSCR/WebUserControls/mod_header.ascx.designer.cs diff --git a/WebSCR/bin/SteamWare.dll b/WebSCR/bin/SteamWare.dll index 823f337..2018c16 100644 Binary files a/WebSCR/bin/SteamWare.dll and b/WebSCR/bin/SteamWare.dll differ diff --git a/WebSCR/bin/WebSCR.dll b/WebSCR/bin/WebSCR.dll index 9ee761a..741cd2b 100644 Binary files a/WebSCR/bin/WebSCR.dll and b/WebSCR/bin/WebSCR.dll differ diff --git a/WebSCR/bin/WebSCR_data.dll b/WebSCR/bin/WebSCR_data.dll index 765581a..f9eb3ca 100644 Binary files a/WebSCR/bin/WebSCR_data.dll and b/WebSCR/bin/WebSCR_data.dll differ diff --git a/WebSCR/logs/20150416.txt b/WebSCR/logs/20150416.txt new file mode 100644 index 0000000..0ce727a --- /dev/null +++ b/WebSCR/logs/20150416.txt @@ -0,0 +1,9 @@ +17:03:13 7924 [EXCEPTION] - Errore recupero permessi! +System.InvalidCastException: Impossibile eseguire il cast di oggetti di tipo 'System.String' sul tipo 'PermessiDataTable'. + in SteamWare.devicesAuthProxy.get_permessi() in c:\Users\samuele\Documents\Visual Studio 2012\Projects\SteamWareLibrary\SteamWare\devicesAuthProxy.cs:riga 314 +17:04:44 5248 [EXCEPTION] - Errore recupero permessi! +System.InvalidCastException: Impossibile eseguire il cast di oggetti di tipo 'System.String' sul tipo 'PermessiDataTable'. + in SteamWare.devicesAuthProxy.get_permessi() in c:\Users\samuele\Documents\Visual Studio 2012\Projects\SteamWareLibrary\SteamWare\devicesAuthProxy.cs:riga 314 +17:07:25 2768 [EXCEPTION] - Errore recupero permessi! +System.InvalidCastException: Impossibile eseguire il cast di oggetti di tipo 'System.String' sul tipo 'PermessiDataTable'. + in SteamWare.devicesAuthProxy.get_permessi() in c:\Users\samuele\Documents\Visual Studio 2012\Projects\SteamWareLibrary\SteamWare\devicesAuthProxy.cs:riga 314 diff --git a/WebSCR/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache b/WebSCR/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache index ef375e3..277bed3 100644 Binary files a/WebSCR/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache and b/WebSCR/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache differ diff --git a/WebSCR/obj/Debug/WebSCR.csproj.FileListAbsolute.txt b/WebSCR/obj/Debug/WebSCR.csproj.FileListAbsolute.txt index 8f7123c..787cf1c 100644 --- a/WebSCR/obj/Debug/WebSCR.csproj.FileListAbsolute.txt +++ b/WebSCR/obj/Debug/WebSCR.csproj.FileListAbsolute.txt @@ -1,14 +1,6 @@ -c:\users\samuele\documents\visual studio 2012\Projects\WebSCR\WebSCR\bin\NLog.config -c:\users\samuele\documents\visual studio 2012\Projects\WebSCR\WebSCR\bin\WebSCR.dll -c:\users\samuele\documents\visual studio 2012\Projects\WebSCR\WebSCR\bin\WebSCR.pdb -c:\users\samuele\documents\visual studio 2012\Projects\WebSCR\WebSCR\bin\SteamWare.dll -c:\users\samuele\documents\visual studio 2012\Projects\WebSCR\WebSCR\bin\Flesk.ViewState.dll -c:\users\samuele\documents\visual studio 2012\Projects\WebSCR\WebSCR\bin\ICSharpCode.SharpZipLib.dll -c:\users\samuele\documents\visual studio 2012\Projects\WebSCR\WebSCR\bin\SteamWare.pdb -c:\users\samuele\documents\visual studio 2012\Projects\WebSCR\WebSCR\bin\SteamWare.xml -c:\users\samuele\documents\visual studio 2012\Projects\WebSCR\WebSCR\obj\Debug\WebSCR.csprojResolveAssemblyReference.cache -c:\users\samuele\documents\visual studio 2012\Projects\WebSCR\WebSCR\obj\Debug\WebSCR.dll -c:\users\samuele\documents\visual studio 2012\Projects\WebSCR\WebSCR\obj\Debug\WebSCR.pdb +C:\Users\samuele\documents\visual studio 2012\Projects\WebSCR\WebSCR\bin\NLog.config +C:\Users\samuele\documents\visual studio 2012\Projects\WebSCR\WebSCR\bin\WebSCR.dll +C:\Users\samuele\documents\visual studio 2012\Projects\WebSCR\WebSCR\bin\WebSCR.pdb C:\Users\samuele\documents\visual studio 2012\Projects\WebSCR\WebSCR\bin\Antlr3.Runtime.dll C:\Users\samuele\documents\visual studio 2012\Projects\WebSCR\WebSCR\bin\Elmah.dll C:\Users\samuele\documents\visual studio 2012\Projects\WebSCR\WebSCR\bin\Microsoft.AspNet.FriendlyUrls.dll @@ -17,12 +9,20 @@ C:\Users\samuele\documents\visual studio 2012\Projects\WebSCR\WebSCR\bin\Microso C:\Users\samuele\documents\visual studio 2012\Projects\WebSCR\WebSCR\bin\Newtonsoft.Json.dll C:\Users\samuele\documents\visual studio 2012\Projects\WebSCR\WebSCR\bin\NLog.dll C:\Users\samuele\documents\visual studio 2012\Projects\WebSCR\WebSCR\bin\NLog.Web.dll +C:\Users\samuele\documents\visual studio 2012\Projects\WebSCR\WebSCR\bin\SteamWare.dll C:\Users\samuele\documents\visual studio 2012\Projects\WebSCR\WebSCR\bin\System.Web.Optimization.dll C:\Users\samuele\documents\visual studio 2012\Projects\WebSCR\WebSCR\bin\WebGrease.dll +C:\Users\samuele\documents\visual studio 2012\Projects\WebSCR\WebSCR\bin\WebSCR_data.dll +C:\Users\samuele\documents\visual studio 2012\Projects\WebSCR\WebSCR\bin\Flesk.ViewState.dll +C:\Users\samuele\documents\visual studio 2012\Projects\WebSCR\WebSCR\bin\ICSharpCode.SharpZipLib.dll +C:\Users\samuele\documents\visual studio 2012\Projects\WebSCR\WebSCR\bin\SteamWare.pdb +C:\Users\samuele\documents\visual studio 2012\Projects\WebSCR\WebSCR\bin\SteamWare.xml +C:\Users\samuele\documents\visual studio 2012\Projects\WebSCR\WebSCR\bin\WebSCR_data.pdb C:\Users\samuele\documents\visual studio 2012\Projects\WebSCR\WebSCR\bin\Antlr3.Runtime.pdb C:\Users\samuele\documents\visual studio 2012\Projects\WebSCR\WebSCR\bin\Microsoft.AspNet.FriendlyUrls.xml C:\Users\samuele\documents\visual studio 2012\Projects\WebSCR\WebSCR\bin\Newtonsoft.Json.xml C:\Users\samuele\documents\visual studio 2012\Projects\WebSCR\WebSCR\bin\NLog.xml C:\Users\samuele\documents\visual studio 2012\Projects\WebSCR\WebSCR\bin\System.Web.Optimization.xml -C:\Users\samuele\documents\visual studio 2012\Projects\WebSCR\WebSCR\bin\WebSCR_data.dll -C:\Users\samuele\documents\visual studio 2012\Projects\WebSCR\WebSCR\bin\WebSCR_data.pdb +C:\Users\samuele\documents\visual studio 2012\Projects\WebSCR\WebSCR\obj\Debug\WebSCR.csprojResolveAssemblyReference.cache +C:\Users\samuele\documents\visual studio 2012\Projects\WebSCR\WebSCR\obj\Debug\WebSCR.dll +C:\Users\samuele\documents\visual studio 2012\Projects\WebSCR\WebSCR\obj\Debug\WebSCR.pdb diff --git a/WebSCR/obj/Debug/WebSCR.csprojResolveAssemblyReference.cache b/WebSCR/obj/Debug/WebSCR.csprojResolveAssemblyReference.cache index 7c2037d..960d82d 100644 Binary files a/WebSCR/obj/Debug/WebSCR.csprojResolveAssemblyReference.cache and b/WebSCR/obj/Debug/WebSCR.csprojResolveAssemblyReference.cache differ diff --git a/WebSCR/obj/Debug/WebSCR.dll b/WebSCR/obj/Debug/WebSCR.dll index 9ee761a..741cd2b 100644 Binary files a/WebSCR/obj/Debug/WebSCR.dll and b/WebSCR/obj/Debug/WebSCR.dll differ diff --git a/WebSCR_data/bin/Debug/SteamWare.dll b/WebSCR_data/bin/Debug/SteamWare.dll index 823f337..2018c16 100644 Binary files a/WebSCR_data/bin/Debug/SteamWare.dll and b/WebSCR_data/bin/Debug/SteamWare.dll differ diff --git a/WebSCR_data/bin/Debug/WebSCR_data.dll b/WebSCR_data/bin/Debug/WebSCR_data.dll index 765581a..f9eb3ca 100644 Binary files a/WebSCR_data/bin/Debug/WebSCR_data.dll and b/WebSCR_data/bin/Debug/WebSCR_data.dll differ diff --git a/WebSCR_data/obj/Debug/WebSCR_data.csproj.FileListAbsolute.txt b/WebSCR_data/obj/Debug/WebSCR_data.csproj.FileListAbsolute.txt index 61c1c00..9605cae 100644 --- a/WebSCR_data/obj/Debug/WebSCR_data.csproj.FileListAbsolute.txt +++ b/WebSCR_data/obj/Debug/WebSCR_data.csproj.FileListAbsolute.txt @@ -1,12 +1,12 @@ -C:\Users\samuele\documents\visual studio 2012\Projects\WebSCR\WebSCR_data\bin\Debug\WebSCR_data.dll -C:\Users\samuele\documents\visual studio 2012\Projects\WebSCR\WebSCR_data\bin\Debug\WebSCR_data.pdb -C:\Users\samuele\documents\visual studio 2012\Projects\WebSCR\WebSCR_data\obj\Debug\WebSCR_data.csprojResolveAssemblyReference.cache -C:\Users\samuele\documents\visual studio 2012\Projects\WebSCR\WebSCR_data\obj\Debug\WebSCR_data.dll -C:\Users\samuele\documents\visual studio 2012\Projects\WebSCR\WebSCR_data\obj\Debug\WebSCR_data.pdb C:\Users\samuele\documents\visual studio 2012\Projects\WebSCR\WebSCR_data\bin\Debug\NLog.config C:\Users\samuele\documents\visual studio 2012\Projects\WebSCR\WebSCR_data\bin\Debug\WebSCR_data.dll.config +C:\Users\samuele\documents\visual studio 2012\Projects\WebSCR\WebSCR_data\bin\Debug\WebSCR_data.dll +C:\Users\samuele\documents\visual studio 2012\Projects\WebSCR\WebSCR_data\bin\Debug\WebSCR_data.pdb C:\Users\samuele\documents\visual studio 2012\Projects\WebSCR\WebSCR_data\bin\Debug\SteamWare.dll C:\Users\samuele\documents\visual studio 2012\Projects\WebSCR\WebSCR_data\bin\Debug\Flesk.ViewState.dll C:\Users\samuele\documents\visual studio 2012\Projects\WebSCR\WebSCR_data\bin\Debug\ICSharpCode.SharpZipLib.dll C:\Users\samuele\documents\visual studio 2012\Projects\WebSCR\WebSCR_data\bin\Debug\SteamWare.pdb C:\Users\samuele\documents\visual studio 2012\Projects\WebSCR\WebSCR_data\bin\Debug\SteamWare.xml +C:\Users\samuele\documents\visual studio 2012\Projects\WebSCR\WebSCR_data\obj\Debug\WebSCR_data.csprojResolveAssemblyReference.cache +C:\Users\samuele\documents\visual studio 2012\Projects\WebSCR\WebSCR_data\obj\Debug\WebSCR_data.dll +C:\Users\samuele\documents\visual studio 2012\Projects\WebSCR\WebSCR_data\obj\Debug\WebSCR_data.pdb diff --git a/WebSCR_data/obj/Debug/WebSCR_data.csprojResolveAssemblyReference.cache b/WebSCR_data/obj/Debug/WebSCR_data.csprojResolveAssemblyReference.cache index 696eed3..4ce65d9 100644 Binary files a/WebSCR_data/obj/Debug/WebSCR_data.csprojResolveAssemblyReference.cache and b/WebSCR_data/obj/Debug/WebSCR_data.csprojResolveAssemblyReference.cache differ diff --git a/WebSCR_data/obj/Debug/WebSCR_data.dll b/WebSCR_data/obj/Debug/WebSCR_data.dll index 765581a..f9eb3ca 100644 Binary files a/WebSCR_data/obj/Debug/WebSCR_data.dll and b/WebSCR_data/obj/Debug/WebSCR_data.dll differ