Abilitato SEMPRE edit movimenti (in attesa gest user e ruoli)

This commit is contained in:
Samuele E. Locatelli
2019-12-18 17:00:28 +01:00
parent 36641e39d3
commit 25e94a4389
4 changed files with 96 additions and 92 deletions
+9 -6
View File
@@ -1,12 +1,11 @@
using System;
using StockManMVC.Models;
using System.Collections.Generic;
using System.Data;
using System.Data.Entity;
using System.Linq;
using System.Net;
using System.Web;
using System.Web.Configuration;
using System.Web.Mvc;
using StockManMVC.Models;
namespace StockManMVC.Controllers
{
@@ -258,12 +257,16 @@ namespace StockManMVC.Controllers
{
return HttpNotFound();
}
// !!!FIXME!!! modificare x abilitare SOLO con ruoli
// 2017.01.03 aggiunto controllo x permesso a resettare INTERA catena flussi + stock... SE in URL si trova comando enabFR=enabFR_key (da webconfig)...
ViewBag.DisplFR = "disabled invisible zeroWidth";
if (enabFR != null)
bool enableAll = false;
bool.TryParse(WebConfigurationManager.AppSettings["enabFR_all"], out enableAll);
if (enabFR != null || enableAll)
{
string enabFR_key = System.Web.Configuration.WebConfigurationManager.AppSettings["enabFR_key"];
if (enabFR == enabFR_key) ViewBag.DisplFR = "";
string enabFR_key = WebConfigurationManager.AppSettings["enabFR_key"];
if (enabFR == enabFR_key || enableAll) ViewBag.DisplFR = "";
}
// restituisco vista parziale
return View(item);