corretto sel pagine da diritti utente
This commit is contained in:
@@ -1,9 +1,14 @@
|
||||
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="mod_footer.ascx.cs" Inherits="C_TRACK.WebUserControls.mod_footer" %>
|
||||
<div data-role="navbar">
|
||||
<div class="divSx" style="color: Yellow;">
|
||||
<asp:Label runat="server" ID="lblLastUpdt" />
|
||||
</div>
|
||||
<div class="divDx" style="color: Yellow;">
|
||||
<asp:Label runat="server" ID="lblVers" />
|
||||
<div class="row" style="color: Yellow;">
|
||||
<div class="col text-left">
|
||||
<asp:Label runat="server" ID="lblLastUpdt" />
|
||||
</div>
|
||||
<div class="col text-center">
|
||||
<%: SteamWare.devicesAuthProxy.stObj.utente %>
|
||||
</div>
|
||||
<div class="col text-right">
|
||||
<asp:Label runat="server" ID="lblVers" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -10,15 +10,16 @@ namespace C_TRACK.WebUserControls
|
||||
{
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
string lastPage = Request.Url.LocalPath.Split('/').Last();
|
||||
if (!Page.IsPostBack)
|
||||
{
|
||||
// se l'utente NON c'è torno a login...
|
||||
if (!devicesAuthProxy.stObj.isAuth)
|
||||
{
|
||||
string lastPage = Request.Url.LocalPath.Split('/').Last();
|
||||
if (lastPage != "" && lastPage != "login")
|
||||
{
|
||||
Session["nextPage"] = lastPage;
|
||||
//}
|
||||
}
|
||||
// SE non sono in "safe page"
|
||||
if (memLayer.ML.CRS("_loginPages").IndexOf(lastPage) < 0)
|
||||
@@ -31,6 +32,13 @@ namespace C_TRACK.WebUserControls
|
||||
PagCorrente();
|
||||
}
|
||||
}
|
||||
// controllo pagina...
|
||||
bool pageAuth = devicesAuthProxy.stObj.isPageEnabled(lastPage);
|
||||
// controllo pag auth...
|
||||
if (!pageAuth)
|
||||
{
|
||||
Response.Redirect("~/login");
|
||||
}
|
||||
lblTitolo.Text = memLayer.ML.confReadString("appName");
|
||||
}
|
||||
/// <summary>
|
||||
|
||||
Reference in New Issue
Block a user