mirror of
https://github.com/wavelog/wavelog.git
synced 2026-03-22 10:24:14 +00:00
protect DANGEROUS Functions from being called without authed user
This commit is contained in:
@@ -8,9 +8,14 @@
|
||||
|
||||
|
||||
class Welcome extends CI_Controller {
|
||||
function __construct() {
|
||||
parent::__construct();
|
||||
|
||||
public function index()
|
||||
{
|
||||
$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'); }
|
||||
}
|
||||
|
||||
public function index() {
|
||||
if($this->optionslib->get_option('version2_trigger') == "false") {
|
||||
$data['page_title'] = "Welcome to Cloudlog Version 2.0";
|
||||
|
||||
@@ -96,4 +101,4 @@ class Welcome extends CI_Controller {
|
||||
echo "Error claiming API Keys during Migration. See Logs for further information";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user