mirror of
https://github.com/alextselegidis/easyappointments.git
synced 2024-12-26 00:23:33 +03:00
Removed obsolete permissions prop
This commit is contained in:
parent
526df6e4d7
commit
72bc5efe34
4 changed files with 2 additions and 24 deletions
|
@ -19,11 +19,6 @@
|
|||
* @package Controllers
|
||||
*/
|
||||
class Account_settings extends EA_Controller {
|
||||
/**
|
||||
* @var array
|
||||
*/
|
||||
protected array $permissions;
|
||||
|
||||
/**
|
||||
* Current_user constructor.
|
||||
*/
|
||||
|
|
|
@ -19,11 +19,6 @@
|
|||
* @package Controllers
|
||||
*/
|
||||
class Calendar extends EA_Controller {
|
||||
/**
|
||||
* @var array
|
||||
*/
|
||||
protected $permissions;
|
||||
|
||||
/**
|
||||
* Calendar constructor.
|
||||
*/
|
||||
|
|
|
@ -31,13 +31,6 @@ class Google extends EA_Controller {
|
|||
$this->load->model('appointments_model');
|
||||
$this->load->model('providers_model');
|
||||
$this->load->model('roles_model');
|
||||
|
||||
$role_slug = session('role_slug');
|
||||
|
||||
if ($role_slug)
|
||||
{
|
||||
$this->permissions = $this->roles_model->get_permissions_by_slug($role_slug);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -368,7 +361,7 @@ class Google extends EA_Controller {
|
|||
|
||||
$user_id = session('user_id');
|
||||
|
||||
if ($this->permissions[PRIV_USERS]['edit'] == FALSE && (int)$user_id !== (int)$provider_id)
|
||||
if (cannot('edit', PRIV_USERS) && (int)$user_id !== (int)$provider_id)
|
||||
{
|
||||
throw new Exception('You do not have the required permissions for this task.');
|
||||
}
|
||||
|
@ -408,7 +401,7 @@ class Google extends EA_Controller {
|
|||
$user_id = session('user_id');
|
||||
|
||||
if (
|
||||
$this->permissions[PRIV_USERS]['edit'] === FALSE
|
||||
cannot('edit', PRIV_USERS)
|
||||
&& (int)$user_id !== (int)$provider_id)
|
||||
{
|
||||
throw new Exception('You do not have the required permissions for this task.');
|
||||
|
|
|
@ -19,11 +19,6 @@
|
|||
* @package Controllers
|
||||
*/
|
||||
class Legal_settings extends EA_Controller {
|
||||
/**
|
||||
* @var array
|
||||
*/
|
||||
protected array $permissions;
|
||||
|
||||
/**
|
||||
* Legal_contents constructor.
|
||||
*/
|
||||
|
|
Loading…
Reference in a new issue