diff --git a/CMS-SC-Data/OpAuth.cs b/CMS-SC-Data/OpAuth.cs
index 28da55c..6d887a3 100644
--- a/CMS-SC-Data/OpAuth.cs
+++ b/CMS-SC-Data/OpAuth.cs
@@ -43,14 +43,15 @@ namespace CMS_SC_Data
/// Fornisce un oggetto OpAuth popolato da email calcolando il resto + lettura default da web.config
///
///
+ ///
///
- public static OpAuth startOpAuth(string email)
+ public static OpAuth startOpAuth(string email, string CognomeNome)
{
OpAuth answ = new OpAuth();
if (email != "")
{
answ.email = email;
- answ.CognomeNome = "Test - completare"; // utils.obj.getOperatoreByCod(email);
+ answ.CognomeNome = CognomeNome;
}
currAuth = answ;
return answ;
diff --git a/CMS-SC-Data/bin/Debug/CMS-SC-Data.dll b/CMS-SC-Data/bin/Debug/CMS-SC-Data.dll
index 81d8cf4..be73174 100644
Binary files a/CMS-SC-Data/bin/Debug/CMS-SC-Data.dll and b/CMS-SC-Data/bin/Debug/CMS-SC-Data.dll differ
diff --git a/CMS-SC-Data/bin/Debug/SteamWare.dll b/CMS-SC-Data/bin/Debug/SteamWare.dll
index c5c08d3..be793db 100644
Binary files a/CMS-SC-Data/bin/Debug/SteamWare.dll and b/CMS-SC-Data/bin/Debug/SteamWare.dll differ
diff --git a/CMS-SC-Data/bin/Debug/SteamWare.xml b/CMS-SC-Data/bin/Debug/SteamWare.xml
index 2f062b2..c95c549 100644
--- a/CMS-SC-Data/bin/Debug/SteamWare.xml
+++ b/CMS-SC-Data/bin/Debug/SteamWare.xml
@@ -1430,12 +1430,19 @@
- Restitusice il numero di attivazioni rimaste x utente dato email e key
+ Restituisce il numero di attivazioni rimaste x utente dato email e key
+
+
+ Restituisce il numero di attivazioni rimaste x utente dato email
+
+
+
+
cancella da session l'utente
diff --git a/CMS-SC-Data/obj/Debug/CMS-SC-Data.dll b/CMS-SC-Data/obj/Debug/CMS-SC-Data.dll
index 81d8cf4..be73174 100644
Binary files a/CMS-SC-Data/obj/Debug/CMS-SC-Data.dll and b/CMS-SC-Data/obj/Debug/CMS-SC-Data.dll differ
diff --git a/CMS_SC/Collaudi.aspx.cs b/CMS_SC/Collaudi.aspx.cs
index 5552006..dd50f6b 100644
--- a/CMS_SC/Collaudi.aspx.cs
+++ b/CMS_SC/Collaudi.aspx.cs
@@ -111,12 +111,15 @@ namespace CMS_SC
get
{
int answ = -1;
- try
+ if (ddlDossier.SelectedValue != "")
{
- answ = Convert.ToInt32(ddlDossier.SelectedValue);
+ try
+ {
+ answ = Convert.ToInt32(ddlDossier.SelectedValue);
+ }
+ catch
+ { }
}
- catch
- { }
return answ;
}
}
@@ -253,14 +256,17 @@ namespace CMS_SC
get
{
bool answ = false;
- try
+ if (ddlDossier.SelectedValue != "")
{
- int idxDossier = Convert.ToInt32(ddlDossier.SelectedValue);
- answ = DtProxy.man.taMis.getNum2Ins(idxDossier, ddlSelScheda.SelectedValue, ddlFase.SelectedValue).Rows.Count > 0;
- }
- catch (Exception exc)
- {
- logger.lg.scriviLog(string.Format("{0}", exc));
+ try
+ {
+ int idxDossier = Convert.ToInt32(ddlDossier.SelectedValue);
+ answ = DtProxy.man.taMis.getNum2Ins(idxDossier, ddlSelScheda.SelectedValue, ddlFase.SelectedValue).Rows.Count > 0;
+ }
+ catch (Exception exc)
+ {
+ logger.lg.scriviLog(string.Format("{0}", exc));
+ }
}
return answ;
}
diff --git a/CMS_SC/Web.config b/CMS_SC/Web.config
index 6a21245..d1e9c80 100644
--- a/CMS_SC/Web.config
+++ b/CMS_SC/Web.config
@@ -42,7 +42,7 @@
-
+
diff --git a/CMS_SC/WebUserControls/mod_enrollUserBase.ascx.cs b/CMS_SC/WebUserControls/mod_enrollUserBase.ascx.cs
index 23c8fba..85e3bbd 100644
--- a/CMS_SC/WebUserControls/mod_enrollUserBase.ascx.cs
+++ b/CMS_SC/WebUserControls/mod_enrollUserBase.ascx.cs
@@ -17,32 +17,27 @@ namespace CMS_SC.WebUserControls
///
protected void btnEnrollByAK_Click(object sender, EventArgs e)
{
- // leggo cognome / nome x controllare email cms nome.cognome@cms.it ...
- string cognome = txtCognome.Text.Trim().ToLower();
- string nome = txtNome.Text.Trim().ToLower();
- string email = string.Format("{0}.{1}@cms.it", nome, cognome);
if (email != "")
{
// ora controllo che l'email SIA nell'elenco delle email degli utenti...
if (devicesAuthProxy.stObj.checkUserEmail(email))
{
-#if false
- // controllo se l'utente è "base" e quindi posso fare auth "semplificata"...
- if (devicesAuthProxy.stObj.checkUserEmailAK(email, authKey))
+ // controllo se l'utente è "base" --> NumAuth = 0 e quindi posso fare auth "semplificata"...
+ if (devicesAuthProxy.stObj.numAuth(email)==0)
{
- // rimando al jumper...
- Response.Redirect(string.Format("jumper?UserAuthkey={0}&USER_NAME={1}", authKey, email));
+ // salvo i dati MINIMI per auth utente (in sessione) SENZA cookie...
+ setupUserBase();
+ Response.Redirect("Collaudi");
}
else
{
- lblOutMsg.Text = traduci("ErrorEAK01");// "Attenzione! auth key NON valida, prego contattare amministratore!";
+ lblOutMsg.Text = traduci("ErrorEAK04");// "Attenzione: profilo utente non corretto per accesso Collaudatore";
lblOutMsg.Visible = true;
}
-#endif
}
else
{
- lblOutMsg.Text = traduci("ErrorEAK02");//"Attenzione! email non trovata, prego contattare amministratore!";
+ lblOutMsg.Text = traduci("ErrorEAK05");// "Attenzione! email non trovata, prego contattare amministratore!";
lblOutMsg.Visible = true;
}
}
@@ -52,5 +47,38 @@ namespace CMS_SC.WebUserControls
lblOutMsg.Visible = true;
}
}
+ ///
+ /// email da cognome/nome inseriti
+ ///
+ protected string email
+ {
+ get
+ {
+ string answ = "";
+ // leggo cognome / nome x controllare email cms nome.cognome@cms.it ...
+ string cognome = txtCognome.Text.Trim().ToLower();
+ string nome = txtNome.Text.Trim().ToLower();
+ if (cognome != "" && nome != "")
+ {
+ try
+ {
+ answ = string.Format("{0}.{1}@cms.it", nome, cognome);
+ }
+ catch
+ { }
+ }
+ return answ;
+ }
+ }
+ ///
+ /// setup cookie e dati vari x utente base (solo collaudo)
+ ///
+ private void setupUserBase()
+ {
+ // crea un valore cookie usando cookieStdSalt
+ string cookieVal = devicesAuthProxy.encodeKey(email);
+ // salvo il cookie nel browser x 2 anni
+ memLayer.ML.setCookieVal(devicesAuthProxy.AuthCookieName, cookieVal, DateTime.Now.AddMinutes(memLayer.ML.CRI("defMinScadUserBase")));
+ }
}
}
\ No newline at end of file
diff --git a/CMS_SC/WebUserControls/mod_testata.ascx b/CMS_SC/WebUserControls/mod_testata.ascx
index 6dc487c..b7698c3 100644
--- a/CMS_SC/WebUserControls/mod_testata.ascx
+++ b/CMS_SC/WebUserControls/mod_testata.ascx
@@ -78,7 +78,7 @@
<%: traduci("UpdateVoc") %>
-
+
diff --git a/CMS_SC/WebUserControls/mod_testata.ascx.cs b/CMS_SC/WebUserControls/mod_testata.ascx.cs
index bcf24b7..04590ef 100644
--- a/CMS_SC/WebUserControls/mod_testata.ascx.cs
+++ b/CMS_SC/WebUserControls/mod_testata.ascx.cs
@@ -73,6 +73,8 @@ namespace CMS_SC.WebUserControls
imgLogo.Visible = logoVisible;
//PagCorrente(); // tolto 2015.02.24
memLayer.ML.emptySessionVal("searchVal");
+ // fix componenti
+ hlUser.DataBind();
}
// SOLO se la pagina NON E' "safe"...
if (memLayer.ML.confReadString("PageNoIndex").IndexOf(titolo) < 0)
@@ -169,21 +171,55 @@ namespace CMS_SC.WebUserControls
{
logger.lg.scriviLog(string.Format("{0}", exc), tipoLog.EXCEPTION);
}
+ // cerco se si tratti PER CASO di un cookie di auth "base" per utenti base...
+ if (email == "")
+ {
+ try
+ {
+ email = devicesAuthProxy.decodeKey(cookie.Value);
+ // cerco SE email sia valida...
+ if (devicesAuthProxy.stObj.checkUserEmail(email))
+ {
+ // se l'utente è "base" procedo...
+ if (devicesAuthProxy.stObj.numAuth(email) != 0)
+ {
+ email = "";
+ }
+ }
+ else
+ {
+ email = "";
+ }
+ }
+ catch
+ { }
+ }
+
if (email != "")
{
// aggiorno descrizione (user agent) ed IP...
userAgent = Request.UserAgent;
postazione_IP = Request.UserHostAddress;
// controllo IP e DeviceDescription x eventuale update
- if ((device.lastIPv4 != postazione_IP) || (device.Description != userAgent))
+ if (device != null)
{
- // salvo ultimo "contatto" del device aggiornando descrizione ed IP
- devicesAuthProxy.stObj.taAnagDev.updateIP(device.IdxDevice, DateTime.Now, postazione_IP, userAgent);
+ if (((device.lastIPv4 != postazione_IP) || (device.Description != userAgent)))
+ {
+ try
+ {
+ // salvo ultimo "contatto" del device aggiornando descrizione ed IP
+ devicesAuthProxy.stObj.taAnagDev.updateIP(device.IdxDevice, DateTime.Now, postazione_IP, userAgent);
+ }
+ catch
+ { }
+ }
}
// salvo in sessione utente
memLayer.ML.setSessionVal("email", email);
// avvio utente...
devicesAuthProxy.stObj.startUpUtente(email);
+ // salvo dati di AUTH OP (x visualizzazione in testata...)
+ OpAuth.startOpAuth(email, devicesAuthProxy.stObj.CognomeNome);
// salvo gruppo...
if (devicesAuthProxy.stObj.isAuth)
{
@@ -315,7 +351,7 @@ namespace CMS_SC.WebUserControls
{
get
{
- return OpAuth.isAuth;
+ return OpAuth.isAuth || devicesAuthProxy.stObj.isAuth;
}
}
///
diff --git a/CMS_SC/bin/CMS-SC-Data.dll b/CMS_SC/bin/CMS-SC-Data.dll
index 81d8cf4..be73174 100644
Binary files a/CMS_SC/bin/CMS-SC-Data.dll and b/CMS_SC/bin/CMS-SC-Data.dll differ
diff --git a/CMS_SC/bin/CMS_SC.dll b/CMS_SC/bin/CMS_SC.dll
index 4f35a74..17f30be 100644
Binary files a/CMS_SC/bin/CMS_SC.dll and b/CMS_SC/bin/CMS_SC.dll differ
diff --git a/CMS_SC/bin/CMS_SC.dll.config b/CMS_SC/bin/CMS_SC.dll.config
index 6a21245..d1e9c80 100644
--- a/CMS_SC/bin/CMS_SC.dll.config
+++ b/CMS_SC/bin/CMS_SC.dll.config
@@ -42,7 +42,7 @@
-
+
diff --git a/CMS_SC/bin/SteamWare.dll b/CMS_SC/bin/SteamWare.dll
index c5c08d3..be793db 100644
Binary files a/CMS_SC/bin/SteamWare.dll and b/CMS_SC/bin/SteamWare.dll differ
diff --git a/CMS_SC/bin/SteamWare.xml b/CMS_SC/bin/SteamWare.xml
index 2f062b2..c95c549 100644
--- a/CMS_SC/bin/SteamWare.xml
+++ b/CMS_SC/bin/SteamWare.xml
@@ -1430,12 +1430,19 @@
- Restitusice il numero di attivazioni rimaste x utente dato email e key
+ Restituisce il numero di attivazioni rimaste x utente dato email e key
+
+
+ Restituisce il numero di attivazioni rimaste x utente dato email
+
+
+
+
cancella da session l'utente