diff --git a/.vscode/launch.json b/.vscode/launch.json new file mode 100644 index 0000000..7d9d36a --- /dev/null +++ b/.vscode/launch.json @@ -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" + } + ] +} \ No newline at end of file diff --git a/.vscode/tasks.json b/.vscode/tasks.json new file mode 100644 index 0000000..a46ac72 --- /dev/null +++ b/.vscode/tasks.json @@ -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" + } + ] +} \ No newline at end of file diff --git a/LiMan.Api/appsettings.json b/LiMan.Api/appsettings.json index 9eaca6a..e723b87 100644 --- a/LiMan.Api/appsettings.json +++ b/LiMan.Api/appsettings.json @@ -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/" } \ No newline at end of file diff --git a/LiMan.DB/Controllers/DbController.cs b/LiMan.DB/Controllers/DbController.cs index a2a9425..b7f8998 100644 --- a/LiMan.DB/Controllers/DbController.cs +++ b/LiMan.DB/Controllers/DbController.cs @@ -923,6 +923,82 @@ namespace LiMan.DB.Controllers return dbResult; } + public List TicketGetFiltAllLic(bool onlyOpen, TipologiaTicket Tipo, string CodApp, string CodInst, int maxNum) + { + List dbResult = new List(); + 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 TicketGetAll(bool onlyOpen, int maxNum) + { + List dbResult = new List(); + 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; diff --git a/LiMan.Transfer/Resources/ChangeLog.html b/LiMan.Transfer/Resources/ChangeLog.html index 1cc67b7..ac6d0cf 100644 --- a/LiMan.Transfer/Resources/ChangeLog.html +++ b/LiMan.Transfer/Resources/ChangeLog.html @@ -1,6 +1,6 @@ License Manager -

Versione: 1.1.2202.0907

+

Versione: 1.1.2202.0912


Note di rilascio:
    diff --git a/LiMan.Transfer/Resources/VersNum.txt b/LiMan.Transfer/Resources/VersNum.txt index 08203ff..29776ab 100644 --- a/LiMan.Transfer/Resources/VersNum.txt +++ b/LiMan.Transfer/Resources/VersNum.txt @@ -1 +1 @@ -1.1.2202.0907 +1.1.2202.0912 diff --git a/LiMan.Transfer/Resources/manifest.xml b/LiMan.Transfer/Resources/manifest.xml index 93a9fc0..3d50f58 100644 --- a/LiMan.Transfer/Resources/manifest.xml +++ b/LiMan.Transfer/Resources/manifest.xml @@ -1,6 +1,6 @@ - 1.1.2202.0907 + 1.1.2202.0912 https://nexus.steamware.net/repository/SWS/LiMan/stable/LAST/LiMan.Transfer.zip https://nexus.steamware.net/repository/SWS/LiMan/stable/LAST/ChangeLog.html false diff --git a/LiMan.UI/App.razor b/LiMan.UI/App.razor index 3a2af53..4df9aaf 100644 --- a/LiMan.UI/App.razor +++ b/LiMan.UI/App.razor @@ -1,10 +1,12 @@ - - - - - - -

    Sorry, there's nothing at this address.

    -
    -
    -
    + + + + + + + +

    Sorry, there's nothing at this address.

    +
    +
    +
    +
    diff --git a/LiMan.UI/Components/CmpTop.razor b/LiMan.UI/Components/CmpTop.razor index 436c6a1..6e2fd8b 100644 --- a/LiMan.UI/Components/CmpTop.razor +++ b/LiMan.UI/Components/CmpTop.razor @@ -8,7 +8,9 @@
    - @**@ + + +
    @PageName diff --git a/LiMan.UI/Components/ListAttach.razor b/LiMan.UI/Components/ListAttach.razor new file mode 100644 index 0000000..36dc28a --- /dev/null +++ b/LiMan.UI/Components/ListAttach.razor @@ -0,0 +1,66 @@ +@using LiMan.UI.Components + +
    +
    +
    +
    +

    File Allegati

    +
    + @*
    + +
    *@ +
    +
    +
    + + @if (ListRecords == null) + { + + } + else if (totalCount == 0) + { +
    Nessun record trovato
    + } + else + { + + + + @**@ + + + + + + + @* @foreach (var record in ListRecords) + { + + + + + + + + }*@ + +
    + + #OriginalNameFullStoragePath
    + + + @record.IdxTicket
    + @record.Status +
    +
    @record.ContactName
    +
    @record.DtReq
    +
    +
    @record.ContactEmail
    +
    @record.ContactPhone
    +
    + @record.ReqBody +
    + } +
    +
    > + diff --git a/LiMan.UI/Components/ListAttach.razor.cs b/LiMan.UI/Components/ListAttach.razor.cs new file mode 100644 index 0000000..5e4bd97 --- /dev/null +++ b/LiMan.UI/Components/ListAttach.razor.cs @@ -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 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 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; + } + } +} \ No newline at end of file diff --git a/LiMan.UI/Components/Tickets.razor b/LiMan.UI/Components/Tickets.razor index b6d1efa..567f637 100644 --- a/LiMan.UI/Components/Tickets.razor +++ b/LiMan.UI/Components/Tickets.razor @@ -1,147 +1,150 @@ -
    -
    -

    Tickets

    -
    -
    +@using LiMan.UI.Components +@using Microsoft.Extensions.Configuration +@inject IConfiguration Configuration - - - - - - - - - - - - @foreach (var record in ListRecords) - { - - - - - - - - } - -
    - - #RichiedenteContatti - Descrizione -
    - - - @record.IdxTicket
    - @record.Status -
    -
    @record.ContactName
    -
    @record.DtReq
    -
    -
    @record.ContactEmail
    -
    @record.ContactPhone
    -
    - @record.ReqBody -
    - @if (idxTicketSel > 0) - { -
    -
    -
    - @if (StatusSel != Core.StatoRichiesta.Richiesta) - { - - } -
    -
    - @if (StatusSel != Core.StatoRichiesta.Valutazione) - { - - } -
    -
    - @if (StatusSel != Core.StatoRichiesta.Approvata) - { - - } -
    -
    - @if (StatusSel != Core.StatoRichiesta.Rifiutata) - { - - } -
    -
    - @if (ListActivations != null && ListActivations.Count > 0) - { - - - - - - - - - - - - - @foreach (var record in ListActivations) - { - - - - - - - - - } - -
    - - #Impiego - Chiave   - @if (showKey) - { - - } - else - { - - } - Scadenza Veto
    - - - @record.IdxSubLic - - @record.CodImpiego - - @if (showKey) - { - @decryptAuthKey(record.Chiave) - } - else - { - @record.Chiave - } - - @($"{record.VetoUnlock:yyyy.MM.dd}") - - @if (record.Locked) - { - - } - else - { - - } -
    - } +@using System.IO +@inject IJSRuntime JS + +
    +
    +
    +
    +

    Tickets

    - } + +
    + + @if (ListRecords == null) + { + + } + else if (totalCount == 0) + { +
    Nessun record trovato
    + } + else + { + + + + + + + + + + + + + + @foreach (var record in ListRecords) + { + + + + + + + + } + + +
    + + #RichiedenteContatti + Descrizione +
    + + + @record.IdxTicket
    + @record.Status +
    +
    @record.ContactName
    +
    @record.DtReq
    +
    +
    @record.ContactEmail
    +
    @record.ContactPhone
    +
    + @record.ReqBody +
    + } + +
    + +
    + + @if (idxTicketSel > 0) + { +
    +
    + + + + + + + + + @foreach (var record in FileAttached) + { + + + + + + + } + +
    Nome FileFullStoragePath
    + @**@ + @record.OriginalName + @* @record.OriginalName*@ + + + +
    @record.FullStoragePath
    +
    + + @* *@ +
    +
    + } +
    + + + +@*
    + @if (idxTicketSel > 0) + { +
    + + + + + + @* + + + + @foreach (var record in FileAttached) + { + + + @* + + } + +
    #OriginalNameFullStoragePath
    + @record.OriginalName
    + +
    +
    @record.FullStoragePath
    +
    +
    + } +
    +*@ \ No newline at end of file diff --git a/LiMan.UI/Components/Tickets.razor.cs b/LiMan.UI/Components/Tickets.razor.cs index 14470b4..31fe242 100644 --- a/LiMan.UI/Components/Tickets.razor.cs +++ b/LiMan.UI/Components/Tickets.razor.cs @@ -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 ListActivations; - private List ListRecords; + private List ListRecords; + protected int totalCount = 0; + + private List 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) diff --git a/LiMan.UI/Data/LiManDataService.cs b/LiMan.UI/Data/LiManDataService.cs index cc5ea28..bc6ebfd 100644 --- a/LiMan.UI/Data/LiManDataService.cs +++ b/LiMan.UI/Data/LiManDataService.cs @@ -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); } + /// + /// Elenco file registrati dato ticket id + /// + /// Identificativo del ticket + /// + public async Task> FileGetFilt(int idxTicket) + { + List dbResult = new List(); + 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 LicenzeNextUpdate(DB.DBModels.LicenzaModel currItem) { bool done = false; @@ -595,6 +615,41 @@ namespace LiMan.UI.Data return await Task.FromResult(fatto); } + + /// + /// Recupera elenco Tickets filtrato + /// + /// + /// + public async Task> TicketsGetFilt(SelectNext CurrFilter) + { + Stopwatch stopWatch = new Stopwatch(); + List dbResult = new List(); + 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); + } + + /// + /// Recupera elenco Tickets filtrato + /// + /// + /// + public async Task> TicketsGetAll() + { + Stopwatch stopWatch = new Stopwatch(); + List dbResult = new List(); + 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 } } \ No newline at end of file diff --git a/LiMan.UI/LiMan.UI.csproj b/LiMan.UI/LiMan.UI.csproj index a06f002..5fff649 100644 --- a/LiMan.UI/LiMan.UI.csproj +++ b/LiMan.UI/LiMan.UI.csproj @@ -2,7 +2,7 @@ net5.0 - 1.1.2202.0907 + 1.1.2202.0912 LiMan.UI LiMan.UI @@ -37,6 +37,7 @@ + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/LiMan.UI/Pages/Applicazioni.razor b/LiMan.UI/Pages/Applicazioni.razor index 18c5944..95b606e 100644 --- a/LiMan.UI/Pages/Applicazioni.razor +++ b/LiMan.UI/Pages/Applicazioni.razor @@ -1,4 +1,5 @@ @page "/Applicazioni" +@attribute [Authorize] @using LiMan.UI.Components @using LiMan.UI.Data diff --git a/LiMan.UI/Pages/Installazioni.razor b/LiMan.UI/Pages/Installazioni.razor index c3f2cc7..10cad1e 100644 --- a/LiMan.UI/Pages/Installazioni.razor +++ b/LiMan.UI/Pages/Installazioni.razor @@ -1,4 +1,5 @@ @page "/Installazioni" +@attribute [Authorize] @using LiMan.UI.Components @using LiMan.UI.Data diff --git a/LiMan.UI/Pages/LiManDB.razor b/LiMan.UI/Pages/LiManDB.razor index e507c15..59e2a61 100644 --- a/LiMan.UI/Pages/LiManDB.razor +++ b/LiMan.UI/Pages/LiManDB.razor @@ -1,4 +1,5 @@ @page "/LiManDB" +@attribute [Authorize] @using LiMan.UI.Components diff --git a/LiMan.UI/Pages/LiManGLS.razor b/LiMan.UI/Pages/LiManGLS.razor index f6e1214..1e05c7c 100644 --- a/LiMan.UI/Pages/LiManGLS.razor +++ b/LiMan.UI/Pages/LiManGLS.razor @@ -1,4 +1,5 @@ @page "/LiManGLS" +@attribute [Authorize] @using LiMan.UI.Components diff --git a/LiMan.UI/Pages/LicenseManager.razor b/LiMan.UI/Pages/LicenseManager.razor index c9e02be..522ed4a 100644 --- a/LiMan.UI/Pages/LicenseManager.razor +++ b/LiMan.UI/Pages/LicenseManager.razor @@ -1,4 +1,5 @@ @page "/LicenseManager" +@attribute [Authorize] @using LiMan.UI.Components diff --git a/LiMan.UI/Pages/ListaTicket.razor b/LiMan.UI/Pages/ListaTicket.razor index c45a328..9c711b7 100644 --- a/LiMan.UI/Pages/ListaTicket.razor +++ b/LiMan.UI/Pages/ListaTicket.razor @@ -1,4 +1,5 @@ @page "/ListaTicket" +@attribute [Authorize] @using LiMan.UI.Components @using LiMan.UI.Data diff --git a/LiMan.UI/Properties/launchSettings.json b/LiMan.UI/Properties/launchSettings.json index 03a78d5..0dd09c4 100644 --- a/LiMan.UI/Properties/launchSettings.json +++ b/LiMan.UI/Properties/launchSettings.json @@ -1,7 +1,7 @@ { "iisSettings": { - "windowsAuthentication": false, - "anonymousAuthentication": true, + "windowsAuthentication": true, + "anonymousAuthentication": false, "iisExpress": { "applicationUrl": "http://localhost:61247", "sslPort": 44392 diff --git a/LiMan.UI/Resources/ChangeLog.html b/LiMan.UI/Resources/ChangeLog.html index 1cc67b7..ac6d0cf 100644 --- a/LiMan.UI/Resources/ChangeLog.html +++ b/LiMan.UI/Resources/ChangeLog.html @@ -1,6 +1,6 @@ License Manager -

    Versione: 1.1.2202.0907

    +

    Versione: 1.1.2202.0912


    Note di rilascio:
      diff --git a/LiMan.UI/Resources/VersNum.txt b/LiMan.UI/Resources/VersNum.txt index 08203ff..29776ab 100644 --- a/LiMan.UI/Resources/VersNum.txt +++ b/LiMan.UI/Resources/VersNum.txt @@ -1 +1 @@ -1.1.2202.0907 +1.1.2202.0912 diff --git a/LiMan.UI/Resources/manifest.xml b/LiMan.UI/Resources/manifest.xml index 7b99f80..0970b42 100644 --- a/LiMan.UI/Resources/manifest.xml +++ b/LiMan.UI/Resources/manifest.xml @@ -1,6 +1,6 @@ - 1.1.2202.0907 + 1.1.2202.0912 https://nexus.steamware.net/repository/SWS/LiMan/stable/LAST/LiMan.UI.zip https://nexus.steamware.net/repository/SWS/LiMan/stable/LAST/ChangeLog.html false diff --git a/LiMan.UI/Startup.cs b/LiMan.UI/Startup.cs index 57cfb22..4347759 100644 --- a/LiMan.UI/Startup.cs +++ b/LiMan.UI/Startup.cs @@ -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 => { diff --git a/LiMan.UI/appsettings.json b/LiMan.UI/appsettings.json index 1da47b7..04e53ef 100644 --- a/LiMan.UI/appsettings.json +++ b/LiMan.UI/appsettings.json @@ -28,5 +28,6 @@ "MailDest": { "Admin": "samuele@steamware.net", "ProcOp": "ceo@steamware.net" - } + }, + "ApiUrl": "https://liman.egalware.com" } \ No newline at end of file