using PnvPanel.Application.Common.Interfaces; namespace PnvPanel.Application.Support; internal static class TicketAuthorization { // Совпадает со значением Infrastructure.Identity.RoleNames.Admin — см. пояснение в // CreateRoleRequestTicketCommandHandler (Application не может ссылаться на Infrastructure). private const string AdminRoleName = "admin"; public static bool IsAdmin(CurrentUserProfile? profile) => profile is not null && profile.Role.Equals(AdminRoleName, StringComparison.OrdinalIgnoreCase); }