Skip to content

Commit c3137a1

Browse files
Merge branch 'RC' into Develop/Fixes/TD-3727-Unrestricted-File-Upload-Vulnerability
2 parents 9155364 + 163853a commit c3137a1

File tree

66 files changed

+15606
-1389
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

66 files changed

+15606
-1389
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,3 +52,4 @@ obj
5252
/OpenAPI/LearningHub.Nhs.OpenApi/web.config
5353
/AdminUI/LearningHub.Nhs.AdminUI/LearningHub.Nhs.AdminUI.csproj.user
5454
/WebAPI/LearningHub.Nhs.API/LearningHub.Nhs.Api.csproj.user
55+
/ReportAPI/LearningHub.Nhs.ReportApi/web.config
Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
namespace LearningHub.Nhs.AdminUI.Controllers.Api
2+
{
3+
using System;
4+
using System.Collections.Generic;
5+
using System.Threading.Tasks;
6+
using elfhHub.Nhs.Models.Common;
7+
using elfhHub.Nhs.Models.Enums;
8+
using LearningHub.Nhs.AdminUI.Interfaces;
9+
using Microsoft.AspNetCore.Authorization;
10+
using Microsoft.AspNetCore.Mvc;
11+
using Microsoft.Extensions.Logging;
12+
using Microsoft.Extensions.Options;
13+
14+
/// <summary>
15+
/// The UserController class.
16+
/// </summary>
17+
[Authorize]
18+
[Route("api/[controller]")]
19+
[ApiController]
20+
public class UserController : BaseApiController
21+
{
22+
/// <summary>
23+
/// The elfh user service..
24+
/// </summary>
25+
private IUserService userService;
26+
27+
/// <summary>
28+
/// Initializes a new instance of the <see cref="UserController"/> class.
29+
/// </summary>
30+
/// <param name="userService">The userService<see cref="IUserService"/>.</param>
31+
/// <param name="loginWizardService">loginWizardService.</param>
32+
/// <param name="logger">logger.</param>
33+
/// <param name="settings">Settings.</param>
34+
public UserController(IUserService userService, ILogger<UserController> logger)
35+
: base(logger)
36+
{
37+
this.userService = userService;
38+
}
39+
40+
/// <summary>
41+
/// The SessionTimeout.
42+
/// </summary>
43+
/// <returns>The <see cref="IActionResult"/>.</returns>
44+
[HttpPost("browser-close")]
45+
public IActionResult BrowserClose()
46+
{
47+
// Add browser close to the UserHistory
48+
UserHistoryViewModel userHistory = new UserHistoryViewModel()
49+
{
50+
UserId = this.CurrentUserId,
51+
UserHistoryTypeId = (int)UserHistoryType.Logout,
52+
Detail = @"User browser closed",
53+
};
54+
55+
this.userService.StoreUserHistory(userHistory);
56+
57+
return this.Ok(true);
58+
}
59+
}
60+
}

AdminUI/LearningHub.Nhs.AdminUI/LearningHub.Nhs.AdminUI.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@
8989
<PackageReference Include="HtmlSanitizer" Version="6.0.453" />
9090
<PackageReference Include="IdentityModel" Version="4.6.0" />
9191
<PackageReference Include="LearningHub.Nhs.Caching" Version="2.0.2" />
92-
<PackageReference Include="LearningHub.Nhs.Models" Version="3.0.47" />
92+
<PackageReference Include="LearningHub.Nhs.Models" Version="3.0.48" />
9393
<PackageReference Include="Microsoft.ApplicationInsights.AspNetCore" Version="2.19.0" />
9494
<PackageReference Include="Microsoft.AspNetCore.Authentication.OpenIdConnect" Version="6.0.36" />
9595
<PackageReference Include="Microsoft.AspNetCore.Mvc.NewtonsoftJson" Version="6.0.36" />

AdminUI/LearningHub.Nhs.AdminUI/Scripts/vuesrc/mkiomediaplayer.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ interface PlayerConfig {
2222
}
2323

2424
interface SourceConfig {
25+
enableLowLatency: boolean;
2526
hls: string;
2627
drm: {
2728
clearkey: ClearKeyConfig;
@@ -57,6 +58,7 @@ function getSourceConfig(
5758
authenticationToken: string
5859
): SourceConfig {
5960
return {
61+
enableLowLatency: true,
6062
hls: locatorUri,
6163
drm: {
6264
clearkey: {
@@ -81,6 +83,7 @@ function initializePlayer(videoContainer: HTMLElement, playerConfig: MKPlayerCon
8183
};
8284

8385
const sourceConfig: SourceConfig = {
86+
enableLowLatency: true,
8487
hls: playBackUrl,
8588
drm: {
8689
clearkey: clearKeyConfig

0 commit comments

Comments
 (0)