allow anonymus access for SAML Portal

This commit is contained in:
2025-08-22 09:12:05 -06:00
parent a458d84935
commit 2c4dfbe74b

View File

@@ -27,7 +27,6 @@ using static System.Runtime.InteropServices.JavaScript.JSType;
namespace SplashPage.Web.Controllers
{
[AbpMvcAuthorize(PermissionNames.Pages_Captive_Portal)]
public class CaptivePortalController : SplashPageControllerBase
{
private readonly ICaptivePortalAppService _captivePortalAppService;
@@ -57,6 +56,7 @@ namespace SplashPage.Web.Controllers
_zeroBounceService = zeroBounceService;
}
[AbpMvcAuthorize(PermissionNames.Pages_Captive_Portal)]
public async Task<IActionResult> Index()
{
var portals = await _captivePortalAppService.GetAllPortalsAsync();
@@ -76,6 +76,7 @@ namespace SplashPage.Web.Controllers
}
[AbpMvcAuthorize(PermissionNames.Pages_Captive_Portal)]
public async Task<IActionResult> Configure(int Id)
{
var portal = await _captivePortalAppService.GetPortalByIdAsync(Id);
@@ -218,6 +219,7 @@ namespace SplashPage.Web.Controllers
}
[HttpPost]
[AbpMvcAuthorize(PermissionNames.Pages_Captive_Portal)]
public async Task<IActionResult> UploadImage(IFormFile file, string imageType, int id)
{
if (file == null || file.Length == 0)
@@ -273,6 +275,7 @@ namespace SplashPage.Web.Controllers
}
[HttpPost]
[AbpMvcAuthorize(PermissionNames.Pages_Captive_Portal)]
public async Task<IActionResult> UploadVideo(IFormFile file, int id)
{
if (file == null || file.Length == 0)
@@ -317,6 +320,7 @@ namespace SplashPage.Web.Controllers
}
[HttpDelete]
[AbpMvcAuthorize(PermissionNames.Pages_Captive_Portal)]
public async Task<IActionResult> DeleteImage([FromBody] DeleteImageInput input)
{
if (string.IsNullOrEmpty(input.Id))
@@ -354,6 +358,7 @@ namespace SplashPage.Web.Controllers
}
[HttpGet]
[AbpMvcAuthorize(PermissionNames.Pages_Captive_Portal)]
public async Task<IActionResult> GetImages(string imageType, int id)
{
if (imageType != "logo" && imageType != "background")
@@ -408,6 +413,7 @@ namespace SplashPage.Web.Controllers
}
[HttpGet]
[AbpMvcAuthorize(PermissionNames.Pages_Captive_Portal)]
public async Task<IActionResult> GetVideo(int id)
{
if (id == null || id == 0)
@@ -451,6 +457,7 @@ namespace SplashPage.Web.Controllers
/// Endpoint para seleccionar una imagen como activa
/// </summary>
[HttpPost]
[AbpMvcAuthorize(PermissionNames.Pages_Captive_Portal)]
public async Task<IActionResult> SelectImage([FromBody] SelectImageInput input)
{
try
@@ -477,6 +484,7 @@ namespace SplashPage.Web.Controllers
}
[HttpPost]
[AbpMvcAuthorize(PermissionNames.Pages_Captive_Portal)]
public async Task<IActionResult> SaveConfiguration([FromBody] CaptivePortalCfgDto config)
{
if (config == null)
@@ -496,6 +504,7 @@ namespace SplashPage.Web.Controllers
}
[HttpPost]
[AbpMvcAuthorize(PermissionNames.Pages_Captive_Portal)]
public async Task<IActionResult> PublishConfiguration([FromBody] PublishConfigInput input)
{
try
@@ -542,6 +551,7 @@ namespace SplashPage.Web.Controllers
}
[HttpPost]
[AbpMvcAuthorize(PermissionNames.Pages_Captive_Portal)]
public async Task<IActionResult> CreatePortal([FromBody] CreateSplashCaptivePortalDto input)
{
try
@@ -577,6 +587,7 @@ namespace SplashPage.Web.Controllers
}
[HttpPost]
[AbpMvcAuthorize(PermissionNames.Pages_Captive_Portal)]
public async Task<IActionResult> DuplicatePortal([FromBody] DuplicatePortalInput input)
{
try
@@ -671,6 +682,7 @@ namespace SplashPage.Web.Controllers
}
[HttpPost]
[AbpMvcAuthorize(PermissionNames.Pages_Captive_Portal)]
public async Task<IActionResult> DeletePortal([FromBody] DeletePortalInput input)
{
try