mirror of
https://github.com/opensourcepos/opensourcepos.git
synced 2025-12-24 10:07:52 -05:00
35 lines
766 B
PHP
35 lines
766 B
PHP
<?php
|
|
|
|
namespace App\Controllers;
|
|
|
|
use App\Models\Module;
|
|
|
|
/**
|
|
* Part of the grants mechanism to restrict access to modules that the user doesn't have permission for.
|
|
* Instantiated in the views.
|
|
*
|
|
* @property module module
|
|
*/
|
|
class No_access extends BaseController
|
|
{
|
|
private Module $module;
|
|
|
|
public function __construct()
|
|
{
|
|
$this->module = model(Module::class);
|
|
}
|
|
|
|
/**
|
|
* @param string $module_id
|
|
* @param string $permission_id
|
|
* @return void
|
|
*/
|
|
public function getIndex(string $module_id = '', string $permission_id = ''): void
|
|
{
|
|
$data['module_name'] = $this->module->get_module_name($module_id);
|
|
$data['permission_id'] = $permission_id;
|
|
|
|
echo view('no_access', $data);
|
|
}
|
|
}
|