Bug fix - notifications audience
* Performers had their notifications publicaly published. * refacto admin group name
This commit is contained in:
parent
d192705f29
commit
d476c08046
36 changed files with 421 additions and 74 deletions
|
|
@ -24,7 +24,7 @@ public sealed class NotificationsApiController : Controller
|
|||
public async Task<ActionResult<List<Notification>>> GetCurrentUserNotifications()
|
||||
{
|
||||
var currentUserId = User.GetUserId();
|
||||
var isAdmin = User.IsInRole(Constants.AdminGroupName);
|
||||
var isAdmin = User.IsInRole(Constants.AdminName);
|
||||
|
||||
var dismissedIds = string.IsNullOrWhiteSpace(currentUserId)
|
||||
? new HashSet<long>()
|
||||
|
|
|
|||
|
|
@ -78,7 +78,7 @@ public sealed class ResourceUsageApiController : Controller
|
|||
[HttpGet(Constants.ResourceUsageAdminRoute)]
|
||||
public async Task<ActionResult<List<ResourceUsageSummary>>> GetAdminOverview()
|
||||
{
|
||||
if (!User.IsInRole(Constants.AdminGroupName))
|
||||
if (!User.IsInRole(Constants.AdminName))
|
||||
{
|
||||
return Forbid();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ using Yavsc.Api.Services;
|
|||
namespace Yavsc.ApiControllers.Administration;
|
||||
|
||||
[ApiController]
|
||||
[ApiExplorerSettings(GroupName = "administration")]
|
||||
[ApiExplorerSettings(GroupName = Constants.Administration)]
|
||||
[Authorize("AdministratorOnly")]
|
||||
[Route(Constants.APIPrefix + "/administration")]
|
||||
[Produces("application/json")]
|
||||
|
|
|
|||
Loading…
Reference in a new issue