continuo pagina gestione utenti
This commit is contained in:
@@ -32,7 +32,11 @@ namespace MedPred
|
||||
// richiamo pagina di edit senza parametri x metodo NEW
|
||||
Response.Redirect("AccettazioneEdit");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// evento selezione paziente...
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void grView_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
// recupero dati paziente...
|
||||
|
||||
@@ -356,6 +356,7 @@
|
||||
<Content Include="fonts\FontAwesome.otf" />
|
||||
<Content Include="WebUserControls\mod_reportVisita.ascx" />
|
||||
<Content Include="JQMobNoCookie.Master" />
|
||||
<Content Include="logs\PlaceHolder.file" />
|
||||
<None Include="NLog.xsd">
|
||||
<SubType>Designer</SubType>
|
||||
</None>
|
||||
@@ -589,9 +590,7 @@
|
||||
<Name>MedPred_Data</Name>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Folder Include="logs\" />
|
||||
</ItemGroup>
|
||||
<ItemGroup />
|
||||
<PropertyGroup>
|
||||
<VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">10.0</VisualStudioVersion>
|
||||
<VSToolsPath Condition="'$(VSToolsPath)' == ''">$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)</VSToolsPath>
|
||||
|
||||
@@ -31,5 +31,5 @@ using System.Runtime.InteropServices;
|
||||
//
|
||||
// You can specify all the values or you can default the Revision and Build Numbers
|
||||
// by using the '*' as shown below:
|
||||
[assembly: AssemblyVersion("1.5.*")]
|
||||
[assembly: AssemblyFileVersion("1.5.*")]
|
||||
[assembly: AssemblyVersion("1.6.*")]
|
||||
[assembly: AssemblyFileVersion("1.6.*")]
|
||||
|
||||
+5
-17
@@ -12,29 +12,17 @@
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
|
||||
<uc1:mod_enrollByJumperAuthKey ID="mod_enrollByJumperAuthKey1" runat="server" />
|
||||
|
||||
|
||||
<div id="divUnauth">
|
||||
|
||||
<div id="divUnauth" runat="server">
|
||||
<h1>Gestione Accesso MedPred</h1>
|
||||
Attenzione, se non è possibile accedere all'applicazione prego richiedere autorizzazione al responsabile del progetto.
|
||||
<br />
|
||||
<uc4:mod_enrollByAuthKey ID="mod_enrollByAuthKey1" runat="server" />
|
||||
<br />
|
||||
<uc2:mod_enrollByEmail ID="mod_enrollByEmail1" runat="server" />
|
||||
|
||||
</div>
|
||||
<div id="divAdmin" runat="server" data-role="collapsible" data-iconpos="right" data-mini="true" data-theme="b" data-content-theme="b">
|
||||
<h4>pagina admin (da fare...)</h4>
|
||||
visibile SOLO ADMIN:
|
||||
<br />
|
||||
vede richieste utente, chaima e/o verifica, e se decide di procedere
|
||||
<uc3:mod_elencoRichResetUtenti ID="mod_elencoRichResetUtenti1" runat="server" />
|
||||
<ul>
|
||||
<li>annulla accesso devices con chiave precedente</li>
|
||||
<li>indica cardinalità max utilizzi chiave</li>
|
||||
<li>genera nuova auth key utente</li>
|
||||
<li>invio chiave ad utente (email) con reset sua chiave... (utilizzabile n volte secondo setup)
|
||||
</li>
|
||||
</ul>
|
||||
<div id="divAdmin" runat="server" data-role="collapsible" data-iconpos="right" data-mini="true" data-theme="b" data-content-theme="b" data-collapsed="false">
|
||||
<h4>Admin Task</h4>
|
||||
<uc3:mod_elencoRichResetUtenti ID="mod_elencoRichResetUtenti1" runat="server" />
|
||||
</div>
|
||||
</asp:Content>
|
||||
|
||||
@@ -23,6 +23,7 @@ namespace MedPred
|
||||
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
|
||||
@@ -32,7 +33,7 @@ namespace MedPred
|
||||
bool answ = false;
|
||||
try
|
||||
{
|
||||
answ = user_std.UtSn.userHasRight("SuperAdmin");
|
||||
answ = devicesAuthProxy.stObj.userHasRight("SuperAdmin");
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
|
||||
Generated
+9
@@ -21,6 +21,15 @@ namespace MedPred {
|
||||
/// </remarks>
|
||||
protected global::MedPred.WebUserControls.mod_enrollByJumperAuthKey mod_enrollByJumperAuthKey1;
|
||||
|
||||
/// <summary>
|
||||
/// divUnauth control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.HtmlControls.HtmlGenericControl divUnauth;
|
||||
|
||||
/// <summary>
|
||||
/// mod_enrollByAuthKey1 control.
|
||||
/// </summary>
|
||||
|
||||
@@ -1,2 +1,75 @@
|
||||
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="mod_elencoRichResetUtenti.ascx.cs" Inherits="MedPred.WebUserControls.mod_elencoRichResetUtenti" %>
|
||||
...elenco richieste reset utenti da approvare con generazione nuova authKey + invio email con link su jumper...
|
||||
|
||||
<div runat="server" id="divComandi" class="ui-nodisc-icon ui-alt-icon">
|
||||
<!-- Classes added to the wrapper -->
|
||||
<a href="#" class="ui-btn ui-shadow ui-corner-all ui-icon-delete ui-btn-icon-top ui-btn-inline">Delete</a>
|
||||
<a href="#" class="ui-btn ui-shadow ui-corner-all ui-icon-plus ui-btn-icon-top ui-btn-inline">Plus</a>
|
||||
<a href="#" class="ui-btn ui-shadow ui-corner-all ui-icon-minus ui-btn-icon-top ui-btn-inline">Minus</a>
|
||||
<a href="#" class="ui-btn ui-shadow ui-corner-all ui-icon-check ui-btn-icon-top ui-btn-inline">Check</a>
|
||||
</div>
|
||||
|
||||
<asp:GridView ID="grView" runat="server" DataSourceID="ods" AutoGenerateColumns="False" DataKeyNames="USER_NAME" CellPadding="4" ForeColor="#333333" GridLines="None" Width="100%" AllowPaging="True" OnSelectedIndexChanged="grView_SelectedIndexChanged" OnRowCommand="grView_RowCommand">
|
||||
<EditRowStyle BackColor="#2461BF" />
|
||||
<FooterStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
|
||||
<HeaderStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
|
||||
<PagerStyle BackColor="#2461BF" ForeColor="White" HorizontalAlign="Center" />
|
||||
<RowStyle BackColor="#EFF3FB" HorizontalAlign="Left" />
|
||||
<SelectedRowStyle BackColor="#D1DDF1" Font-Bold="True" ForeColor="#333333" />
|
||||
<SortedAscendingCellStyle BackColor="#F5F7FB" />
|
||||
<SortedAscendingHeaderStyle BackColor="#6D95E1" />
|
||||
<SortedDescendingCellStyle BackColor="#E9EBEF" />
|
||||
<SortedDescendingHeaderStyle BackColor="#4870BE" />
|
||||
<AlternatingRowStyle BackColor="White" />
|
||||
<Columns>
|
||||
<asp:TemplateField ShowHeader="False" ItemStyle-HorizontalAlign="Center" HeaderStyle-HorizontalAlign="Center">
|
||||
<ItemTemplate>
|
||||
<div class="ui-nodisc-icon ui-alt-icon" style="white-space: nowrap;">
|
||||
<asp:LinkButton CssClass="ui-btn ui-shadow ui-corner-all ui-icon-user ui-btn-icon-notext ui-btn-inline" ID="LinkButton1" data-icon="star" runat="server" CausesValidation="False" CommandArgument="select" CommandName="Select" Text="Sel" />
|
||||
<asp:LinkButton ID="LinkButton2" CssClass="ui-btn ui-shadow ui-corner-all ui-icon-edit ui-btn-icon-notext ui-btn-inline" runat="server" CausesValidation="False" CommandArgument="edit" CommandName="Select" Text="Edit" />
|
||||
</div>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:BoundField DataField="cognome" HeaderText="Cognome" SortExpression="cognome" />
|
||||
<asp:BoundField DataField="nome" HeaderText="Nome" SortExpression="nome" />
|
||||
<asp:BoundField DataField="email" HeaderText="email" SortExpression="email" />
|
||||
<asp:BoundField DataField="numAuth" HeaderText="# Auth" SortExpression="numAuth" />
|
||||
<asp:BoundField DataField="CodGruppo" HeaderText="Gruppo" SortExpression="CodGruppo" />
|
||||
<asp:TemplateField ShowHeader="False" ItemStyle-HorizontalAlign="Center" HeaderStyle-HorizontalAlign="Center" HeaderText="Reset">
|
||||
<ItemTemplate>
|
||||
<div class="ui-nodisc-icon ui-alt-icon" style="white-space: nowrap;">
|
||||
<asp:LinkButton CssClass="ui-btn ui-shadow ui-corner-all ui-icon-check ui-btn-icon-notext ui-btn-inline" ID="lbResetAuth" data-icon="star" runat="server" CausesValidation="False" CommandArgument="select" CommandName="Select" Text="Sel" Visible='<%# toBool(Eval("resetAuthKeyReq")) %>' ToolTip="Reset & send Mail" />
|
||||
<asp:LinkButton ID="lbCancelResetAuth" CssClass="ui-btn ui-shadow ui-corner-all ui-icon-delete ui-btn-icon-notext ui-btn-inline" runat="server" CausesValidation="False" CommandArgument="edit" CommandName="Select" Text="Edit" Visible='<%# toBool(Eval("resetAuthKeyReq")) %>' ToolTip="Rifiuta reset" />
|
||||
</div>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
</Columns>
|
||||
|
||||
</asp:GridView>
|
||||
<asp:ObjectDataSource ID="ods" runat="server" SelectMethod="GetData" TypeName="SteamWare.DS_AuthTableAdapters.UtentiTableAdapter" OldValuesParameterFormatString="Original_{0}"></asp:ObjectDataSource>
|
||||
...elenco richieste reset utenti da approvare con generazione nuova authKey + invio email con link su jumper...
|
||||
<br />
|
||||
<div data-role="collapsible" data-iconpos="right" data-theme="a" data-content-theme="a">
|
||||
<h3>Spiegazione</h3>
|
||||
La colonna a destra indica le richieste di supporto ricevute, si può selezionare di confermare ed inviare l'email di enroll dei dispositivi (con "v") oppure rifiutare le richieste stesse (con "X").
|
||||
<br />
|
||||
La colonna a sinistra permette di modificare i dati dell'utente, ovvero cambiare il num massimo di attivazioni ancora consentite per dispositivi, cambiare email/cognome/nome. Se viene lasciato vuoto il campo authKey questa rimane invariata, altrimenti viene generata una nova chiave casuale ed i dispositivi dell'utente vengono annullati.
|
||||
<br />
|
||||
Si possono inserire nuovi utenti
|
||||
<br />
|
||||
Infine è possibile disattivare utenti (button "X") e riportarli attivi (con "V")
|
||||
<br />
|
||||
<br />
|
||||
vede richieste utente, chaima e/o verifica, e se decide di procedere
|
||||
<ul>
|
||||
<li>annulla accesso devices con chiave precedente</li>
|
||||
<li>invio chiave ad utente (email) con reset a 1 numero usi (SE FA EDIT poi può cambiare numAuth)</li>
|
||||
</ul>
|
||||
inoltre deve poter
|
||||
<ul>
|
||||
<li>creare nuovi utenti</li>
|
||||
<li>indicare max utilizzi chiave</li>
|
||||
<li>indicare email, cognome, nome, gruppo</li>
|
||||
<li>genera nuova auth key utente da versione plain (se inserita) --> in quel caso ANNULLA i devices abilitati...</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -11,7 +11,79 @@ namespace MedPred.WebUserControls
|
||||
{
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
if (!Page.IsPostBack)
|
||||
{
|
||||
divComandi.Visible = false;
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// ultimo comando letto da link button
|
||||
/// </summary>
|
||||
public string lastCmd { get; set; }
|
||||
/// <summary>
|
||||
/// gestione evento novo record
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
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;
|
||||
}
|
||||
/// <summary>
|
||||
/// evento selezione paziente...
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void grView_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
// mostro il div comandi
|
||||
divComandi.Visible = true;
|
||||
#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();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -3,15 +3,40 @@
|
||||
// This code was generated by a tool.
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace MedPred.WebUserControls
|
||||
{
|
||||
|
||||
|
||||
public partial class mod_elencoRichResetUtenti
|
||||
{
|
||||
namespace MedPred.WebUserControls {
|
||||
|
||||
|
||||
public partial class mod_elencoRichResetUtenti {
|
||||
|
||||
/// <summary>
|
||||
/// divComandi control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.HtmlControls.HtmlGenericControl divComandi;
|
||||
|
||||
/// <summary>
|
||||
/// grView control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.GridView grView;
|
||||
|
||||
/// <summary>
|
||||
/// ods control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.ObjectDataSource ods;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1443,6 +1443,13 @@
|
||||
Effettua setup dei permessi una volta salvati i diritti
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:SteamWare.devicesAuthProxy.userHasRight(System.String)">
|
||||
<summary>
|
||||
verifica nella tab diritti se l'utente abbia il right richiesto e fornisce bool in risposta
|
||||
</summary>
|
||||
<param name="diritto"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="P:SteamWare.devicesAuthProxy.diritti">
|
||||
<summary>
|
||||
restituisce la tabella diritti da session
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Reference in New Issue
Block a user