Protected properties were once [incorrectly] available

This commit is contained in:
Samuel Georges 2015-08-29 20:12:55 +10:00
parent 6f029426ff
commit ee38c72f04
3 changed files with 7 additions and 5 deletions

View File

@ -5,6 +5,7 @@ use Lang;
use View;
use Response;
use Backend;
use BackendAuth;
use Backend\Classes\ControllerBehavior;
use League\Csv\Reader as CsvReader;
use League\Csv\Writer as CsvWriter;
@ -620,7 +621,7 @@ class ImportExportController extends ControllerBehavior
{
if (
($permissions = $this->getConfig($type.'[permissions]')) &&
(!$this->controller->user->hasAnyAccess((array) $permissions))
(!BackendAuth::getUser()->hasAnyAccess((array) $permissions))
) {
return Response::make(View::make('backend::access_denied'), 403);
}

View File

@ -39,9 +39,9 @@ class SettingsModel extends ModelBehavior
{
parent::__construct($model);
$this->model->table = 'system_settings';
$this->model->jsonable = ['value'];
$this->model->guarded = [];
$this->model->setTable('system_settings');
$this->model->jsonable(['value']);
$this->model->guard([]);
$this->model->timestamps = false;
// Option A: (@todo Determine which is faster by benchmark)

View File

@ -1,5 +1,6 @@
<?php namespace System\ReportWidgets;
use BackendAuth;
use System\Models\Parameters;
use System\Classes\UpdateManager;
use Cms\Models\MaintenanceSettings;
@ -46,7 +47,7 @@ class Status extends ReportWidgetBase
{
$manager = UpdateManager::instance();
$this->vars['inMaintenance'] = MaintenanceSettings::get('is_enabled');
$this->vars['showUpdates'] = $this->controller->user->hasAccess('system.manage_updates');
$this->vars['showUpdates'] = BackendAuth::getUser()->hasAccess('system.manage_updates');
$this->vars['updates'] = $manager->check();
}
}