Added Auth-Check. Setted all to Normaluser (it's listed in the Menu as user)
这个提交包含在:
父节点
9b89651138
当前提交
5ae749a5e0
共有 1 个文件被更改,包括 8 次插入 和 2 次删除
|
|
@ -4,8 +4,7 @@ class Dxatlas extends CI_Controller {
|
|||
|
||||
public function index() {
|
||||
$this->load->model('user_model');
|
||||
|
||||
if(!$this->user_model->authorize(99)) { $this->session->set_flashdata('notice', 'You\'re not allowed to do that!'); redirect('dashboard'); }
|
||||
if(!$this->user_model->authorize(2)) { $this->session->set_flashdata('notice', 'You\'re not allowed to do that!'); redirect('dashboard'); }
|
||||
|
||||
$this->load->model('modes');
|
||||
$this->load->model('logbook_model');
|
||||
|
|
@ -26,6 +25,9 @@ class Dxatlas extends CI_Controller {
|
|||
}
|
||||
|
||||
public function export() {
|
||||
$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'); }
|
||||
|
||||
$this->load->model('dxatlas_model');
|
||||
|
||||
// Parameters
|
||||
|
|
@ -45,6 +47,8 @@ class Dxatlas extends CI_Controller {
|
|||
}
|
||||
|
||||
function generateFiles($wkdArray, $cfmArray, $band) {
|
||||
$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'); }
|
||||
|
||||
$gridCfmArray = [];
|
||||
$gridWkdArray = [];
|
||||
|
|
@ -100,6 +104,8 @@ class Dxatlas extends CI_Controller {
|
|||
}
|
||||
|
||||
function makeZip($gridWkdString, $gridCfmString, $band) {
|
||||
$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'); }
|
||||
$zipFileName = 'dxatlas_gridsquares_'. $band . '.zip';
|
||||
// Prepare File
|
||||
$file = tempnam("tmp", "zip");
|
||||
|
|
|
|||
正在加载…
在新工单中引用