diff --git a/src/api/VoteMonitor.Api.DataExport/Controllers/DataExportController.cs b/src/api/VoteMonitor.Api.DataExport/Controllers/DataExportController.cs index 43be6783..ab7857e5 100644 --- a/src/api/VoteMonitor.Api.DataExport/Controllers/DataExportController.cs +++ b/src/api/VoteMonitor.Api.DataExport/Controllers/DataExportController.cs @@ -27,7 +27,7 @@ public DataExportController(IMediator mediator, ILogger lo /// /// [HttpGet("all")] - [Authorize("Organizer")] + [Authorize("NgoAdmin")] public async Task GetAllData(int? idNgo, int? idObserver, int? pollingStationNumber, string county, DateTime? from, DateTime? to) { var filter = new GetDataForExport @@ -65,7 +65,7 @@ public async Task GetAllData(int? idNgo, int? idObserver, int? po } [HttpGet("all/notes")] - [Authorize("Organizer")] + [Authorize("NgoAdmin")] public async Task GetAllNotes(int? idNgo, int? idObserver, int? pollingStationNumber, string county, DateTime? from, DateTime? to) { var filter = new GetNotesForExport diff --git a/src/api/VoteMonitor.Api.Notification/Controllers/NotificationController.cs b/src/api/VoteMonitor.Api.Notification/Controllers/NotificationController.cs index fea81cfe..458166f4 100644 --- a/src/api/VoteMonitor.Api.Notification/Controllers/NotificationController.cs +++ b/src/api/VoteMonitor.Api.Notification/Controllers/NotificationController.cs @@ -48,7 +48,7 @@ public async Task RegisterTokenAsync(NotificationRegistrationDataModel } [HttpPost] - [Authorize("Organizer")] + [Authorize("NgoAdmin")] [Route("send")] public async Task Send([FromBody]NotificationNewModel newNotificationModel) { @@ -60,7 +60,7 @@ public async Task Send([FromBody]NotificationNewModel newNotificationMo } [HttpPost] - [Authorize("Organizer")] + [Authorize("NgoAdmin")] [Route("send/all")] public async Task SendToAll([FromBody]NotificationForAllNewModel model) { diff --git a/src/api/VoteMonitor.Api.Observer/Controllers/ObserverController.cs b/src/api/VoteMonitor.Api.Observer/Controllers/ObserverController.cs index 6e26f787..94e07957 100644 --- a/src/api/VoteMonitor.Api.Observer/Controllers/ObserverController.cs +++ b/src/api/VoteMonitor.Api.Observer/Controllers/ObserverController.cs @@ -93,7 +93,7 @@ public async Task Import(IFormFile file, [FromForm] int ongId) /// /// Boolean indicating whether or not the observer was added successfully. [HttpPost] - [Authorize("Organizer")] + [Authorize("NgoAdmin")] [Produces(type: typeof(int))] public async Task NewObserver(NewObserverModel model) { @@ -115,7 +115,7 @@ public async Task NewObserver(NewObserverModel model) /// /// Boolean indicating whether or not the observer was changed successfully [HttpPut] - [Authorize("Organizer")] + [Authorize("NgoAdmin")] [Produces(type: typeof(bool))] public async Task EditObserver([FromBody] EditObserverModel model) { @@ -148,7 +148,7 @@ public async Task EditObserver([FromBody] EditObserverModel model /// The Observer id /// Boolean indicating whether or not the observer was deleted successfully [HttpDelete] - [Authorize("Organizer")] + [Authorize("NgoAdmin")] [Produces(type: typeof(bool))] public async Task DeleteObserver(int id) { @@ -212,7 +212,7 @@ public async Task RemoveObserverDeviceId(int id) [HttpPost] [Route("reset")] - [Authorize("Organizer")] + [Authorize("NgoAdmin")] public async Task Reset([FromBody] ResetModel model) { if (string.IsNullOrEmpty(model.Action) || string.IsNullOrEmpty(model.PhoneNumber))