From 306ff316f37e98ac1c9165e4dda00cc8ffc339fe Mon Sep 17 00:00:00 2001 From: phl0 Date: Thu, 8 Jan 2026 09:48:34 +0100 Subject: [PATCH] Add auth to webadif controller --- application/controllers/Webadif.php | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/application/controllers/Webadif.php b/application/controllers/Webadif.php index 989693cc0..dc52e3b2d 100644 --- a/application/controllers/Webadif.php +++ b/application/controllers/Webadif.php @@ -3,6 +3,16 @@ /* Controller to interact with the webADIF API */ class Webadif extends CI_Controller { + function __construct() { + parent::__construct(); + + $this->load->model('user_model'); + if (!$this->user_model->authorize(2)) { + $this->session->set_flashdata('error', __("You're not allowed to do that!")); + redirect('dashboard'); + } + } + /* * Upload QSO to webADIF * When called from the url wavelog/webadif/upload, the function loops through all station_id's with a webADIF