mirror of
https://github.com/BinaryAlley/Nemera.git
synced 2026-12-03 01:11:10 +00:00
Adds library management authorization permission
This commit is contained in:
1 parent
45a0cb4276
commit
d4ef2dfa9f
8 files changed
+53
-67
No files matched your search
+3
@@ -1,5 +1,7 @@
|
||||
#region ========================================================================= USING =====================================================================================
|
||||
using Lumina.Presentation.Web.Common.Api;
|
||||
using Lumina.Presentation.Web.Common.Attributes;
|
||||
using Lumina.Presentation.Web.Common.Enums.Authorization;
|
||||
using Lumina.Presentation.Web.Common.Models.Libraries;
|
||||
using Microsoft.AspNetCore.Authorization;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
@@ -63,6 +65,7 @@ public class LibraryManagementController : Controller
|
||||
/// <param name="cancellationToken">Cancellation token that can be used to stop the execution.</param>
|
||||
[ValidateAntiForgeryToken]
|
||||
[HttpPost("api-item")]
|
||||
[RequirePermission(AuthorizationPermission.canCreateLibraries)]
|
||||
public async Task<IActionResult> SaveLibrary([FromBody] LibraryModel data, CancellationToken cancellationToken)
|
||||
{
|
||||
// call different API endpoints based on whether this is a new library or an existing one
|
||||
|
||||
Reference in new issue
Block a user