Files
b2bcondomini.it/PUB/UserAdmin.aspx.cs
T
2018-05-22 18:55:52 +02:00

44 lines
1000 B
C#

using SteamWare;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
namespace PUB
{
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_enrollByAuthKey.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;
}
}
}
}