Added Auth-Check. Setted all to Normaluser (it's listed in the Menu as user)

这个提交包含在:
int2001 2023-08-08 17:25:10 +00:00
父节点 9b89651138
当前提交 5ae749a5e0
找不到此签名对应的密钥
GPG 密钥 ID: DFB1C13CD2DB037B

查看文件

@ -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");