コード例 #1
0
        public async Task <ActionResult <List <VenueListVm> > > GetOrganizerVenuesAsync()
        {
            var userId = User.FindFirstValue(ClaimTypes.NameIdentifier);

            if (!await _securityService.IsOrgAdmin(userId) && !await _securityService.HasCrewPermissionAsync(userId, CrewPermissionType.VenueAdmin))
            {
                return(Forbid());
            }

            return(await _venueService.GetOrganizerVenuesAsync());
        }