Update gestione autoenroll
git-svn-id: https://keyhammer.ath.cx/svn/WebGIM/trunk@100 3e04ef4b-3b25-4b6c-be27-bb5389ca777b
This commit is contained in:
Binary file not shown.
@@ -28,7 +28,7 @@
|
||||
<assemblies>
|
||||
<add assembly="System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
|
||||
<add assembly="System.Design, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/>
|
||||
<add assembly="Microsoft.Web.Services2, Version=2.0.3.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
|
||||
<!--<add assembly="Microsoft.Web.Services2, Version=2.0.3.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>-->
|
||||
<add assembly="System.Security, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/>
|
||||
<add assembly="System.ServiceProcess, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/>
|
||||
<add assembly="System.Configuration.Install, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/>
|
||||
|
||||
@@ -25,11 +25,11 @@
|
||||
<add key="_adminEmail" value="info@steamware.net"/>
|
||||
<add key="_logDir" value="./logs/"/>
|
||||
<add key="_smtpCli" value="localhost"/>
|
||||
<add key="PermessiConnectionString" value="Data Source=localhost;Initial Catalog=GIM;Persist Security Info=True;User id=sa;Password=keyhammer"/>
|
||||
<add key="UtenteCdcConnectionString" value="Data Source=localhost;Initial Catalog=SteamWare_Anagrafica;Persist Security Info=True;User id=sa;Password=keyhammer"/>
|
||||
<add key="VocabolarioConnectionString" value="Data Source=localhost;Initial Catalog=SteamWare_Vocabolario;Persist Security Info=True;User id=sa;Password=keyhammer"/>
|
||||
<add key="AppConnectionString" value="Data Source=localhost;Initial Catalog=GIM;Persist Security Info=True;User id=sa;Password=keyhammer"/>
|
||||
<add key="TestAppConnectionString" value="Data Source=localhost;Initial Catalog=GIM_test;Persist Security Info=True;User id=sa;Password=keyhammer"/>
|
||||
<add key="PermessiConnectionString" value="Data Source=localhost;Initial Catalog=GIM;Persist Security Info=True;User id=steamware;Password=viadante16"/>
|
||||
<add key="UtenteCdcConnectionString" value="Data Source=localhost;Initial Catalog=SteamWare_Anagrafica;Persist Security Info=True;User id=steamware;Password=viadante16"/>
|
||||
<add key="VocabolarioConnectionString" value="Data Source=localhost;Initial Catalog=SteamWare_Vocabolario;Persist Security Info=True;User id=steamware;Password=viadante16"/>
|
||||
<add key="AppConnectionString" value="Data Source=localhost;Initial Catalog=GIM;Persist Security Info=True;User id=steamware;Password=viadante16"/>
|
||||
<add key="TestAppConnectionString" value="Data Source=localhost;Initial Catalog=GIM_test;Persist Security Info=True;User id=steamware;Password=viadante16"/>
|
||||
<!--valori default-->
|
||||
<add key ="defaultMatr" value="0000"/>
|
||||
<add key ="defaultCodImp" value="0000"/>
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
<connectionStrings>
|
||||
<add name="GIMConnectionString" connectionString="Data Source=localhost;Initial Catalog=GIM;Persist Security Info=True;User ID=sa;Password=keyhammer" providerName="System.Data.SqlClient"/>
|
||||
<add name="GIMConnectionString" connectionString="Data Source=localhost;Initial Catalog=GIM;Persist Security Info=True;User ID=steamware;Password=viadante16" providerName="System.Data.SqlClient"/>
|
||||
</connectionStrings>
|
||||
@@ -0,0 +1,55 @@
|
||||
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="autoEnroll.aspx.cs" Inherits="autoEnroll" %>
|
||||
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head runat="server">
|
||||
<title></title>
|
||||
</head>
|
||||
<body>
|
||||
<form id="form1" runat="server">
|
||||
<div style="text-align:center;">
|
||||
<h1>
|
||||
Registrazione nuovo utente
|
||||
</h1>
|
||||
<table>
|
||||
<tr>
|
||||
<td>
|
||||
Cognome:
|
||||
</td>
|
||||
<td>
|
||||
<asp:TextBox ID="txtCognome" runat="server" />
|
||||
<asp:RequiredFieldValidator ID="rfvCognome" runat="server" ErrorMessage="Richiesto!"
|
||||
ControlToValidate="txtCognome" />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
Nome:
|
||||
</td>
|
||||
<td>
|
||||
<asp:TextBox ID="txtNome" runat="server" />
|
||||
<asp:RequiredFieldValidator ID="rfvNome" runat="server" ErrorMessage="Richiesto!"
|
||||
ControlToValidate="txtNome" />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
email:
|
||||
</td>
|
||||
<td>
|
||||
<asp:TextBox ID="txtEmail" runat="server" />
|
||||
<asp:RequiredFieldValidator ID="rfvEmail" runat="server" ErrorMessage="Richiesto!"
|
||||
ControlToValidate="txtEmail" />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2" align="center">
|
||||
<asp:Button ID="btnSave" runat="server" Text="Salva" Width="200px"
|
||||
onclick="btnSave_Click" />
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</form>
|
||||
</body>
|
||||
</html>
|
||||
@@ -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");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -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}<br>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
|
||||
|
||||
Reference in New Issue
Block a user