mirror of
https://github.com/opensourcepos/opensourcepos.git
synced 2026-09-13 05:47:23 -04:00
Merge branch 'master' into plugin-system-fresh
This commit is contained in:
90 files changed
+4225
-2824
No files matched your search
@@ -4,6 +4,7 @@ namespace App\Controllers;
|
||||
|
||||
use App\Models\Employee;
|
||||
use App\Models\Module;
|
||||
use CodeIgniter\HTTP\Exceptions\RedirectException;
|
||||
use CodeIgniter\HTTP\ResponseInterface;
|
||||
use CodeIgniter\Model;
|
||||
use CodeIgniter\Session\Session;
|
||||
@@ -39,18 +40,12 @@ class Secure_Controller extends BaseController
|
||||
$config = config(OSPOS::class)->settings;
|
||||
$validation = Services::validation();
|
||||
|
||||
if (!$this->employee->is_logged_in()) {
|
||||
header("Location:" . base_url('login'));
|
||||
exit();
|
||||
}
|
||||
|
||||
$logged_in_employee_info = $this->employee->get_logged_in_employee_info();
|
||||
if (
|
||||
!$this->employee->has_module_grant($module_id, $logged_in_employee_info->person_id)
|
||||
|| (isset($submodule_id) && !$this->employee->has_module_grant($submodule_id, $logged_in_employee_info->person_id))
|
||||
) {
|
||||
header("Location:" . base_url("no_access/$module_id/$submodule_id"));
|
||||
exit();
|
||||
throw new RedirectException("no_access/$module_id/$submodule_id");
|
||||
}
|
||||
|
||||
// Load up global global_view_data visible to all the loaded views
|
||||
@@ -144,9 +139,9 @@ class Secure_Controller extends BaseController
|
||||
|
||||
/**
|
||||
* @param int $data_item_id
|
||||
* @return false
|
||||
* @return ResponseInterface|false
|
||||
*/
|
||||
public function postSave(int $data_item_id = -1)
|
||||
public function postSave(int $data_item_id = -1): ResponseInterface|false
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user