Merge branch 'release/AddWindowsAuth'

This commit is contained in:
Samuele Locatelli
2022-02-09 12:48:08 +01:00
27 changed files with 562 additions and 177 deletions
+35
View File
@@ -0,0 +1,35 @@
{
"version": "0.2.0",
"configurations": [
{
// Use IntelliSense to find out which attributes exist for C# debugging
// Use hover for the description of the existing attributes
// For further information visit https://github.com/OmniSharp/omnisharp-vscode/blob/master/debugger-launchjson.md
"name": ".NET Core Launch (web)",
"type": "coreclr",
"request": "launch",
"preLaunchTask": "build",
// If you have changed target frameworks, make sure to update the program path.
"program": "${workspaceFolder}/LiMan.UI/bin/Debug/net5.0/LiMan.UI.dll",
"args": [],
"cwd": "${workspaceFolder}/LiMan.UI",
"stopAtEntry": false,
// Enable launching a web browser when ASP.NET Core starts. For more information: https://aka.ms/VSCode-CS-LaunchJson-WebBrowser
"serverReadyAction": {
"action": "openExternally",
"pattern": "\\bNow listening on:\\s+(https?://\\S+)"
},
"env": {
"ASPNETCORE_ENVIRONMENT": "Development"
},
"sourceFileMap": {
"/Views": "${workspaceFolder}/Views"
}
},
{
"name": ".NET Core Attach",
"type": "coreclr",
"request": "attach"
}
]
}
+41
View File
@@ -0,0 +1,41 @@
{
"version": "2.0.0",
"tasks": [
{
"label": "build",
"command": "dotnet",
"type": "process",
"args": [
"build",
"${workspaceFolder}/LiMan.UI/LiMan.UI.csproj",
"/property:GenerateFullPaths=true",
"/consoleloggerparameters:NoSummary"
],
"problemMatcher": "$msCompile"
},
{
"label": "publish",
"command": "dotnet",
"type": "process",
"args": [
"publish",
"${workspaceFolder}/LiMan.UI/LiMan.UI.csproj",
"/property:GenerateFullPaths=true",
"/consoleloggerparameters:NoSummary"
],
"problemMatcher": "$msCompile"
},
{
"label": "watch",
"command": "dotnet",
"type": "process",
"args": [
"watch",
"run",
"--project",
"${workspaceFolder}/LiMan.UI/LiMan.UI.csproj"
],
"problemMatcher": "$msCompile"
}
]
}
+2 -1
View File
@@ -42,5 +42,6 @@
],
"Database": 14
},
"FileShare": "\\\\stor01\\TEAM DRIVES\\40_FileUpload\\unsafe_uploads"
"FileShare": "\\\\stor01\\TEAM DRIVES\\40_FileUpload\\unsafe_uploads",
"ApiUrl": "https://liman.egalware.com/"
}
+76
View File
@@ -923,6 +923,82 @@ namespace LiMan.DB.Controllers
return dbResult;
}
public List<TicketDTO> TicketGetFiltAllLic(bool onlyOpen, TipologiaTicket Tipo, string CodApp, string CodInst, int maxNum)
{
List<TicketDTO> dbResult = new List<TicketDTO>();
using (LMDbContext localDbCtx = new LMDbContext(_configuration))
{
// recupero locenza...
var currLic = localDbCtx
.DbSetLicenze
.Where(x => x.CodApp == CodApp && x.CodInst == CodInst)
.FirstOrDefault();
if (currLic != null)
{
dbResult = localDbCtx
.DbSetTicket
.Where(x => (x.LicenzaNav.CodApp == CodApp && x.LicenzaNav.CodInst == CodInst) && (x.Status <= StatoRichiesta.Valutazione || !onlyOpen) && (x.TType == Tipo || Tipo == TipologiaTicket.ND))
.OrderByDescending(x => x.IdxTicket)
.Take(maxNum)
.Select(x => new TicketDTO
{
IdxTicket = x.IdxTicket,
IdxLic = x.IdxLic,
IdxSubLic = x.IdxSubLic,
CodImpiego = x.CodImpiego,
ContactName = x.ContactName,
ContactEmail = x.ContactEmail,
ContactPhone = x.ContactPhone,
DtReq = x.DtReq,
ReqBody = x.ReqBody,
Status = x.Status,
SupplAnsw = x.SupplAnsw,
SupplEmail = x.SupplEmail,
SupplUserCode = x.SupplUserCode,
Tipo = x.Tipo
})
.ToList();
}
}
return dbResult;
}
public List<TicketDTO> TicketGetAll(bool onlyOpen, int maxNum)
{
List<TicketDTO> dbResult = new List<TicketDTO>();
using (LMDbContext localDbCtx = new LMDbContext(_configuration))
{
dbResult = localDbCtx
.DbSetTicket
.Where(x => (x.Status <= StatoRichiesta.Valutazione || !onlyOpen))
.OrderByDescending(x => x.IdxTicket)
.Take(maxNum)
.Select(x => new TicketDTO
{
IdxTicket = x.IdxTicket,
IdxLic = x.IdxLic,
IdxSubLic = x.IdxSubLic,
CodImpiego = x.CodImpiego,
ContactName = x.ContactName,
ContactEmail = x.ContactEmail,
ContactPhone = x.ContactPhone,
DtReq = x.DtReq,
ReqBody = x.ReqBody,
Status = x.Status,
SupplAnsw = x.SupplAnsw,
SupplEmail = x.SupplEmail,
SupplUserCode = x.SupplUserCode,
Tipo = x.Tipo
})
.ToList();
}
return dbResult;
}
public bool TicketUpdateState(int IdxTicket, StatoRichiesta NewStatus)
{
bool fatto = false;
+1 -1
View File
@@ -1,6 +1,6 @@
<body>
<i>License Manager</i>
<h4>Versione: 1.1.2202.0907</h4>
<h4>Versione: 1.1.2202.0912</h4>
<br />
Note di rilascio:
<ul>
+1 -1
View File
@@ -1 +1 @@
1.1.2202.0907
1.1.2202.0912
+1 -1
View File
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<item>
<version>1.1.2202.0907</version>
<version>1.1.2202.0912</version>
<url>https://nexus.steamware.net/repository/SWS/LiMan/stable/LAST/LiMan.Transfer.zip</url>
<changelog>https://nexus.steamware.net/repository/SWS/LiMan/stable/LAST/ChangeLog.html</changelog>
<mandatory>false</mandatory>
+12 -10
View File
@@ -1,10 +1,12 @@
<Router AppAssembly="@typeof(Program).Assembly" PreferExactMatches="@true">
<Found Context="routeData">
<RouteView RouteData="@routeData" DefaultLayout="@typeof(MainLayout)" />
</Found>
<NotFound>
<LayoutView Layout="@typeof(MainLayout)">
<p>Sorry, there's nothing at this address.</p>
</LayoutView>
</NotFound>
</Router>
<CascadingAuthenticationState>
<Router AppAssembly="@typeof(Program).Assembly" PreferExactMatches="@true">
<Found Context="routeData">
<RouteView RouteData="@routeData" DefaultLayout="@typeof(MainLayout)" />
</Found>
<NotFound>
<LayoutView Layout="@typeof(MainLayout)">
<p>Sorry, there's nothing at this address.</p>
</LayoutView>
</NotFound>
</Router>
</CascadingAuthenticationState>
+3 -1
View File
@@ -8,7 +8,9 @@
<div class="form-row pt-3">
<div class="col-7 col-md-6 col-lg-4 col-xl-3">
@*<LoginDisplay></LoginDisplay>*@
<AuthorizeView>
<LoginDisplay />
</AuthorizeView>
</div>
<div class="col-12 col-lg-4 col-xl-6 d-none d-lg-block text-center h4 text-truncate">
<span class="@PageIcon" aria-hidden="true"></span> @PageName
+66
View File
@@ -0,0 +1,66 @@
@using LiMan.UI.Components
<div class="card">
<div class="card-header">
<div class="row">
<div class="col-9">
<h3>File Allegati</h3>
</div>
@*<div class="col-3 text-right">
<button class="btn btn-sm btn-success" @onclick="() => AddNew()"><i class="fas fa-plus"></i></button>
</div>*@
</div>
</div>
<div class="card-body bg-light p-1">
@if (ListRecords == null)
{
<LoadingData></LoadingData>
}
else if (totalCount == 0)
{
<div class="alert alert-warning text-center display-4">Nessun record trovato</div>
}
else
{
<table class="table table-sm table-striped table-responsive-lg">
<thead>
<tr>
@*<th>
<button type="button" class="btn btn-sm btn-warning btn-block" @onclick="close"><i class="fas fa-times"></i></button>
</th>*@
<th>#</th>
<th>OriginalName</th>
<th>FullStoragePath</th>
</tr>
</thead>
<tbody>
@* @foreach (var record in ListRecords)
{
<tr>
<td>
<button type="button" class="btn btn-sm btn-primary" @onclick="() => showDet(record)"><i class="fas fa-search"></i></button>
</td>
<td>
@record.IdxTicket<br />
@record.Status
</td>
<td>
<div><b>@record.ContactName</b></div>
<div>@record.DtReq</div>
</td>
<td>
<div>@record.ContactEmail</div>
<div>@record.ContactPhone</div>
</td>
<td>
@record.ReqBody
</td>
</tr>
}*@
</tbody>
</table>
}
</div>
</div>>
+54
View File
@@ -0,0 +1,54 @@
using Core;
using LiMan.DB.DBModels;
using LiMan.DB.DTO;
using LiMan.UI.Data;
using Microsoft.AspNetCore.Components;
using Microsoft.JSInterop;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
namespace LiMan.UI.Components
{
public partial class ListAttach
{
private List<FileAttachModel> ListRecords;
protected int totalCount = 0;
//protected override async Task OnInitializedAsync()
//{
// await ReloadAllData();
//}
private bool isLoading { get; set; } = false;
[Inject]
private IJSRuntime JSRuntime { get; set; }
[Inject]
protected LiManDataService DataService { get; set; }
[Parameter]
public EventCallback<int> DataReset { get; set; }
private async Task fullReload()
{
await DataService.InvalidateAllCache();
await ReloadAllData();
}
private async Task ReloadAllData()
{
//isLoading = true;
//ListActivations = null;
//idxTicketSel = 0;
await Task.Delay(1);
//bool StatoRichiesta = true;
ListRecords = await DataService.FileGetFilt(5);
totalCount = ListRecords.Count();
//isLoading = false;
}
}
}
+146 -143
View File
@@ -1,147 +1,150 @@
<div class="card">
<div class="card-header bg-success py-1 text-light">
<h3>Tickets</h3>
</div>
<div class="card-body bg-light p-1">
@using LiMan.UI.Components
@using Microsoft.Extensions.Configuration
@inject IConfiguration Configuration
<table class="table table-sm table-striped table-responsive-lg">
<thead>
<tr>
<th>
<button type="button" class="btn btn-sm btn-warning btn-block" value="Cancel" @onclick="close"><i class="fas fa-times"></i></button>
</th>
<th>#</th>
<th>Richiedente</th>
<th>Contatti</th>
<th>
Descrizione
</th>
</tr>
</thead>
<tbody>
@foreach (var record in ListRecords)
{
<tr>
<td>
<button type="button" class="btn btn-sm btn-primary" value="Cancel" @onclick="() => showDet(record)"><i class="fas fa-search"></i></button>
</td>
<td>
@record.IdxTicket<br />
@record.Status
</td>
<td>
<div><b>@record.ContactName</b></div>
<div>@record.DtReq</div>
</td>
<td>
<div>@record.ContactEmail</div>
<div>@record.ContactPhone</div>
</td>
<td>
@record.ReqBody
</td>
</tr>
}
</tbody>
</table>
@if (idxTicketSel > 0)
{
<div class="table-primary p-2">
<div class="row">
<div class="col-3">
@if (StatusSel != Core.StatoRichiesta.Richiesta)
{
<button type="button" class="btn btn-sm btn-info btn-block" @onclick="() => updateStato(Core.StatoRichiesta.Richiesta)">Attesa Valutazione <i class="fas fa-pause"></i></button>
}
</div>
<div class="col-3">
@if (StatusSel != Core.StatoRichiesta.Valutazione)
{
<button type="button" class="btn btn-sm btn-info btn-block" @onclick="() => updateStato(Core.StatoRichiesta.Valutazione)">Prendi in carico <i class="fas fa-play"></i></button>
}
</div>
<div class="col-3">
@if (StatusSel != Core.StatoRichiesta.Approvata)
{
<button type="button" class="btn btn-sm btn-success btn-block" @onclick="() => updateStato(Core.StatoRichiesta.Approvata)">Approva <i class="fas fa-check"></i></button>
}
</div>
<div class="col-3">
@if (StatusSel != Core.StatoRichiesta.Rifiutata)
{
<button type="button" class="btn btn-sm btn-danger btn-block" @onclick="() => updateStato(Core.StatoRichiesta.Rifiutata)">Rifiuta <i class="fas fa-times"></i></button>
}
</div>
</div>
@if (ListActivations != null && ListActivations.Count > 0)
{
<table class="table table-sm table-striped table-responsive-lg bg-light">
<thead>
<tr>
<th>
<button type="button" class="btn btn-sm btn-dark btn-block" value="Cancel" @onclick="closeDet"><i class="fas fa-times"></i></button>
</th>
<th>#</th>
<th>Impiego</th>
<th>
Chiave &nbsp;
@if (showKey)
{
<button type="button" class="btn btn-sm btn-warning" @onclick="() => showDecrypt()"><i class="fas fa-eye-slash"></i></button>
}
else
{
<button type="button" class="btn btn-sm btn-success" @onclick="() => showDecrypt()"><i class="fas fa-eye"></i></button>
}
</th>
<th>Scadenza Veto</th>
<th class="text-right"><i class="fas fa-user-lock"></i></th>
</tr>
</thead>
<tbody>
@foreach (var record in ListActivations)
{
<tr class="@checkSelect(record.IdxLic)">
<td class="text-nowrap">
<button class="btn btn-sm btn-info" @onclick="() => UnLock(record)" title="Edit record">
<i class="oi oi-lock-unlocked"></i>
</button>
</td>
<td>
<b>@record.IdxSubLic</b>
</td>
<td>
@record.CodImpiego
</td>
<td>
@if (showKey)
{
<span class="text-success">@decryptAuthKey(record.Chiave)</span>
}
else
{
@record.Chiave
}
</td>
<td>
<span class="@cssScadenza(record.VetoUnlock)">@($"{record.VetoUnlock:yyyy.MM.dd}")</span>
</td>
<td class="text-right">
@if (record.Locked)
{
<span aria-hidden="true" title="Licenza Bloccata"><i class="fas fa-lock text-danger"></i></span>
}
else
{
<span aria-hidden="true" title="Licenza Libera"><i class="fas fa-unlock-alt text-success"></i></span>
}
</td>
</tr>
}
</tbody>
</table>
}
@using System.IO
@inject IJSRuntime JS
<div class="row">
<div class="@mainCss">
<div class="card">
<div class="card-header bg-success py-1 text-light">
<h3>Tickets</h3>
</div>
}
<div class="card-body bg-light p-1">
@if (ListRecords == null)
{
<LoadingData></LoadingData>
}
else if (totalCount == 0)
{
<div class="alert alert-warning text-center display-4">Nessun record trovato</div>
}
else
{
<table class="table table-sm table-striped table-responsive-lg">
<thead>
<tr>
<th>
<button type="button" class="btn btn-sm btn-warning btn-block" @onclick="() => ReloadAllData()"><i class="fas fa-times"></i></button>
</th>
<th>#</th>
<th>Richiedente</th>
<th>Contatti</th>
<th>
Descrizione
</th>
</tr>
</thead>
<tbody>
@foreach (var record in ListRecords)
{
<tr>
<td>
<button type="button" class="btn btn-sm btn-primary" @onclick="() => showDet(record)"><i class="fas fa-search"></i></button>
</td>
<td>
@record.IdxTicket<br />
@record.Status
</td>
<td>
<div><b>@record.ContactName</b></div>
<div>@record.DtReq</div>
</td>
<td>
<div>@record.ContactEmail</div>
<div>@record.ContactPhone</div>
</td>
<td>
@record.ReqBody
</td>
</tr>
}
</tbody>
</table>
}
</div>
</div>
</div>
@if (idxTicketSel > 0)
{
<div class="col-3">
<div>
<table class="table table-sm table-striped table-responsive-lg">
<thead>
<tr>
<th>Nome File</th>
<th>FullStoragePath</th>
</tr>
</thead>
<tbody>
@foreach (var record in FileAttached)
{
<tr>
<td>
@*<button @onclick="() => DownloadFileFromURL(record.OriginalName, record.FullStoragePath)"> @record.OriginalName</button>*@
<a href="@(Configuration["ApiUrl"]+"/ELM.API/api/filesave/"+@record.FullStoragePath+"/"+@record.OriginalName)" target="_blank">@record.OriginalName</a>
@*<a @onclick="() => DownloadFileFromURL(record.OriginalName, record.FullStoragePath)"> @record.OriginalName</a>*@
</td>
<td>
<div>@record.FullStoragePath</div>
</td>
</tr>
}
</tbody>
</table>
@* <button @onclick="DownloadFileFromURL">
Download File From URL
</button>*@
</div>
</div>
}
</div>
@*<div class="card-body bg-light p-2">
@if (idxTicketSel > 0)
{
<div>
<table class="table table-sm table-striped table-responsive-lg">
<thead>
<tr>
<th>#</th>
<th>OriginalName</th>
@*<th>FullStoragePath</th>
</tr>
</thead>
<tbody>
@foreach (var record in FileAttached)
{
<tr>
<td>
@record.OriginalName<br />
</td>
@*<td>
<div>@record.FullStoragePath</div>
</td>
</tr>
}
</tbody>
</table>
</div>
}
</div>
*@
+31 -12
View File
@@ -1,5 +1,7 @@
using Core;
using Core.DTO;
using LiMan.DB.DBModels;
using LiMan.DB.DTO;
using LiMan.UI.Data;
using Microsoft.AspNetCore.Components;
using Microsoft.JSInterop;
@@ -15,7 +17,10 @@ namespace LiMan.UI.Components
#region Private Fields
private List<SubLicenzaModel> ListActivations;
private List<TicketModel> ListRecords;
private List<TicketDTO> ListRecords;
protected int totalCount = 0;
private List<FileAttachModel> FileAttached;
#endregion Private Fields
@@ -99,25 +104,38 @@ namespace LiMan.UI.Components
await ReloadAllData();
}
protected string mainCss
{
get => idxTicketSel == 0 ? "col-12" : "col-9";
}
private async Task ReloadAllData()
{
isLoading = true;
ListActivations = null;
idxTicketSel = 0;
await Task.Delay(1);
ListRecords = MasterLicence.Tickets.ToList();
//bool StatoRichiesta = true;
ListRecords = await DataService.TicketsGetAll();
totalCount = ListRecords.Count();
isLoading = false;
}
//private async void DownloadFileFromURL(string fileName, string rawUrl)
//{
// rawUrl = rawUrl.Replace("\\", "/");
// var fileURL = $"unsafe_uploads/"+rawUrl;
// //var fileName = "log-0001.txt";
// //var fileName = FileAttached;
// await JS.InvokeVoidAsync("triggerFileDownload", fileName, fileURL);
//}
#endregion Private Methods
#region Protected Methods
protected async void close()
{
await DataUpdated.InvokeAsync(0);
}
protected async void closeDet()
{
await ReloadAllData();
@@ -156,16 +174,17 @@ namespace LiMan.UI.Components
showKey = !showKey;
}
protected void showDet(TicketModel currTicket)
protected async Task showDet(TicketDTO currTicket)
{
// salvo ticket sel
idxTicketSel = currTicket.IdxTicket;
StatusSel = currTicket.Status;
FileAttached = await DataService.FileGetFilt(idxTicketSel);
// mostro SOLO le attivazioni di cui ho ticket attivi...
ListActivations = MasterLicence
.Attivazioni
.Where(a => a.IdxSubLic == currTicket.IdxSubLic)
.ToList();
//ListActivations = MasterLicence
//.Attivazioni
//.Where(a => a.IdxSubLic == currTicket.IdxSubLic)
//.ToList();
}
protected async Task UnLock(SubLicenzaModel selRecord)
+55
View File
@@ -12,6 +12,8 @@ using System.Text;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Identity.UI.Services;
using Core;
using Core.DTO;
using LiMan.DB.DBModels;
namespace LiMan.UI.Data
{
@@ -538,6 +540,24 @@ namespace LiMan.UI.Data
return await Task.FromResult(dbResult);
}
/// <summary>
/// Elenco file registrati dato ticket id
/// </summary>
/// <param name="idxTicket">Identificativo del ticket</param>
/// <returns></returns>
public async Task<List<FileAttachModel>> FileGetFilt(int idxTicket)
{
List<FileAttachModel> dbResult = new List<FileAttachModel>();
Stopwatch stopWatch = new Stopwatch();
stopWatch.Start();
dbResult = dbControllerNext.FileGetFilt(idxTicket);
stopWatch.Stop();
TimeSpan ts = stopWatch.Elapsed;
Log.Trace($"Effettuata lettura da DB per FileGetFilt: {ts.TotalMilliseconds} ms");
return await Task.FromResult(dbResult);
}
public async Task<bool> LicenzeNextUpdate(DB.DBModels.LicenzaModel currItem)
{
bool done = false;
@@ -595,6 +615,41 @@ namespace LiMan.UI.Data
return await Task.FromResult(fatto);
}
/// <summary>
/// Recupera elenco Tickets filtrato
/// </summary>
/// <param name="CurrFilter"></param>
/// <returns></returns>
public async Task<List<TicketDTO>> TicketsGetFilt(SelectNext CurrFilter)
{
Stopwatch stopWatch = new Stopwatch();
List<TicketDTO> dbResult = new List<TicketDTO>();
stopWatch.Start();
dbResult = dbControllerNext.TicketGetFiltAllLic(CurrFilter.OnlyActive, Core.TipologiaTicket.ND, CurrFilter.ApplicazioneSel, CurrFilter.InstallazioneSel, 1000);
stopWatch.Stop();
TimeSpan ts = stopWatch.Elapsed;
Log.Trace($"Effettuata lettura da DB per TicketsGetFilt: {ts.TotalMilliseconds} ms");
return await Task.FromResult(dbResult);
}
/// <summary>
/// Recupera elenco Tickets filtrato
/// </summary>
/// <param name="CurrFilter"></param>
/// <returns></returns>
public async Task<List<TicketDTO>> TicketsGetAll()
{
Stopwatch stopWatch = new Stopwatch();
List<TicketDTO> dbResult = new List<TicketDTO>();
stopWatch.Start();
dbResult = dbControllerNext.TicketGetAll(false, 1000);
stopWatch.Stop();
TimeSpan ts = stopWatch.Elapsed;
Log.Trace($"Effettuata lettura da DB per TicketsGetAll: {ts.TotalMilliseconds} ms");
return await Task.FromResult(dbResult);
}
#endregion Public Methods
}
}
+2 -1
View File
@@ -2,7 +2,7 @@
<PropertyGroup>
<TargetFramework>net5.0</TargetFramework>
<Version>1.1.2202.0907</Version>
<Version>1.1.2202.0912</Version>
<RootNamespace>LiMan.UI</RootNamespace>
<AssemblyName>LiMan.UI</AssemblyName>
</PropertyGroup>
@@ -37,6 +37,7 @@
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.Authentication.Negotiate" Version="5.0.14" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="5.0.10">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
+1
View File
@@ -1,4 +1,5 @@
@page "/Applicazioni"
@attribute [Authorize]
@using LiMan.UI.Components
@using LiMan.UI.Data
+1
View File
@@ -1,4 +1,5 @@
@page "/Installazioni"
@attribute [Authorize]
@using LiMan.UI.Components
@using LiMan.UI.Data
+1
View File
@@ -1,4 +1,5 @@
@page "/LiManDB"
@attribute [Authorize]
@using LiMan.UI.Components
+1
View File
@@ -1,4 +1,5 @@
@page "/LiManGLS"
@attribute [Authorize]
@using LiMan.UI.Components
+1
View File
@@ -1,4 +1,5 @@
@page "/LicenseManager"
@attribute [Authorize]
@using LiMan.UI.Components
+1
View File
@@ -1,4 +1,5 @@
@page "/ListaTicket"
@attribute [Authorize]
@using LiMan.UI.Components
@using LiMan.UI.Data
+2 -2
View File
@@ -1,7 +1,7 @@
{
"iisSettings": {
"windowsAuthentication": false,
"anonymousAuthentication": true,
"windowsAuthentication": true,
"anonymousAuthentication": false,
"iisExpress": {
"applicationUrl": "http://localhost:61247",
"sslPort": 44392
+1 -1
View File
@@ -1,6 +1,6 @@
<body>
<i>License Manager</i>
<h4>Versione: 1.1.2202.0907</h4>
<h4>Versione: 1.1.2202.0912</h4>
<br />
Note di rilascio:
<ul>
+1 -1
View File
@@ -1 +1 @@
1.1.2202.0907
1.1.2202.0912
+1 -1
View File
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<item>
<version>1.1.2202.0907</version>
<version>1.1.2202.0912</version>
<url>https://nexus.steamware.net/repository/SWS/LiMan/stable/LAST/LiMan.UI.zip</url>
<changelog>https://nexus.steamware.net/repository/SWS/LiMan/stable/LAST/ChangeLog.html</changelog>
<mandatory>false</mandatory>
+23
View File
@@ -15,6 +15,9 @@ using System.Globalization;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Identity.UI.Services;
using Microsoft.Extensions.FileProviders;
using Microsoft.AspNetCore.Authentication.Negotiate;
using Microsoft.AspNetCore.Http;
namespace LiMan.UI
{
@@ -72,8 +75,20 @@ namespace LiMan.UI
app.UseHttpsRedirection();
app.UseStaticFiles();
app.UseFileServer(new FileServerOptions
{
FileProvider = new PhysicalFileProvider(@"\\stor01\TEAM DRIVES\40_FileUpload\unsafe_uploads"),
RequestPath = new PathString("/unsafe_uploads"),
EnableDirectoryBrowsing = true
//EnableDirectoryBrowsing = false
});
app.UseRouting();
app.UseAuthentication();
app.UseAuthorization();
app.UseEndpoints(endpoints =>
{
endpoints.MapBlazorHub();
@@ -85,6 +100,14 @@ namespace LiMan.UI
// For more information on how to configure your application, visit https://go.microsoft.com/fwlink/?LinkID=398940
public void ConfigureServices(IServiceCollection services)
{
services.AddAuthentication(NegotiateDefaults.AuthenticationScheme)
.AddNegotiate();
services.AddAuthorization(options =>
{
// By default, all incoming requests will be authorized according to the default policy.
options.FallbackPolicy = options.DefaultPolicy;
});
// cookie applicazione da 14 gg (defaul) a 30
services.ConfigureApplicationCookie(o =>
{
+2 -1
View File
@@ -28,5 +28,6 @@
"MailDest": {
"Admin": "samuele@steamware.net",
"ProcOp": "ceo@steamware.net"
}
},
"ApiUrl": "https://liman.egalware.com"
}