From 291d75f0fe09f00d4291effa16093fa12f5bbe2d Mon Sep 17 00:00:00 2001 From: Peter Goodhall Date: Wed, 12 Oct 2022 11:23:01 +0100 Subject: [PATCH] [Bands] Don't show create or edit buttons for users who arent admin --- application/controllers/Band.php | 1 + application/views/bands/index.php | 6 ++++++ 2 files changed, 7 insertions(+) diff --git a/application/controllers/Band.php b/application/controllers/Band.php index 04c6ec17..98a92cb6 100644 --- a/application/controllers/Band.php +++ b/application/controllers/Band.php @@ -13,6 +13,7 @@ class Band extends CI_Controller { $this->load->model('user_model'); if(!$this->user_model->authorize(2)) { $this->session->set_flashdata('notice', 'You\'re not allowed to do that!'); redirect('dashboard'); } + print_r($this->session->userdata('user_type')); } public function index() diff --git a/application/views/bands/index.php b/application/views/bands/index.php index ec79ddb5..0edaa541 100644 --- a/application/views/bands/index.php +++ b/application/views/bands/index.php @@ -54,8 +54,10 @@ $wwff = 0; SSB QRG DATA QRG CW QRG + session->userdata('user_type') == '99') { ?> + @@ -77,12 +79,14 @@ $wwff = 0; ssb;?> data;?> cw;?> + session->userdata('user_type') == '99') { ?> + @@ -111,9 +115,11 @@ $wwff = 0;

+ session->userdata('user_type') == '99') { ?> +