Removed obsolete permissions prop

This commit is contained in:
Alex Tselegidis 2021-12-18 17:37:00 +01:00
parent 526df6e4d7
commit 72bc5efe34
4 changed files with 2 additions and 24 deletions

View file

@ -19,11 +19,6 @@
* @package Controllers * @package Controllers
*/ */
class Account_settings extends EA_Controller { class Account_settings extends EA_Controller {
/**
* @var array
*/
protected array $permissions;
/** /**
* Current_user constructor. * Current_user constructor.
*/ */

View file

@ -19,11 +19,6 @@
* @package Controllers * @package Controllers
*/ */
class Calendar extends EA_Controller { class Calendar extends EA_Controller {
/**
* @var array
*/
protected $permissions;
/** /**
* Calendar constructor. * Calendar constructor.
*/ */

View file

@ -31,13 +31,6 @@ class Google extends EA_Controller {
$this->load->model('appointments_model'); $this->load->model('appointments_model');
$this->load->model('providers_model'); $this->load->model('providers_model');
$this->load->model('roles_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'); $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.'); 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'); $user_id = session('user_id');
if ( if (
$this->permissions[PRIV_USERS]['edit'] === FALSE cannot('edit', PRIV_USERS)
&& (int)$user_id !== (int)$provider_id) && (int)$user_id !== (int)$provider_id)
{ {
throw new Exception('You do not have the required permissions for this task.'); throw new Exception('You do not have the required permissions for this task.');

View file

@ -19,11 +19,6 @@
* @package Controllers * @package Controllers
*/ */
class Legal_settings extends EA_Controller { class Legal_settings extends EA_Controller {
/**
* @var array
*/
protected array $permissions;
/** /**
* Legal_contents constructor. * Legal_contents constructor.
*/ */