From ba36f600b021f45104a17caa6e78a23dd3b05e19 Mon Sep 17 00:00:00 2001 From: Amir Sanni Date: Sun, 1 Aug 2021 12:19:21 +0100 Subject: [PATCH] Ensure only super user can access Items controller --- application/controllers/Items.php | 3 +- application/views/main.php | 374 +++++++++++++++--------------- 2 files changed, 191 insertions(+), 186 deletions(-) diff --git a/application/controllers/Items.php b/application/controllers/Items.php index 9692515..e3aec19 100644 --- a/application/controllers/Items.php +++ b/application/controllers/Items.php @@ -13,6 +13,7 @@ public function __construct(){ parent::__construct(); $this->genlib->checkLogin(); + $this->genlib->superOnly(); $this->load->model(['item']); } @@ -393,4 +394,4 @@ public function delete(){ //set final output $this->output->set_content_type('application/json')->set_output(json_encode($json)); } -} \ No newline at end of file +} diff --git a/application/views/main.php b/application/views/main.php index 0544473..5b6ded0 100644 --- a/application/views/main.php +++ b/application/views/main.php @@ -1,82 +1,84 @@ - - <?= $pageTitle ?> - - - - - - - - - - - - - - - + + <?= $pageTitle ?> + + + + + + + + + + + + + + + + + + - - - + - - - - + - - - + + - - -
-
- - + +
- -
- -
- + +
+
+
+
- + - -