Revize c1bdc1c4
Přidáno uživatelem Michal Kliment před více než 9 roky(ů)
application/controllers/clouds.php | ||
---|---|---|
*/
|
||
class Clouds_Controller extends Controller
|
||
{
|
||
/**
|
||
* Constructor, only test if networks is enabled
|
||
*/
|
||
public function __construct()
|
||
{
|
||
parent::__construct();
|
||
|
||
// access control
|
||
if (!Settings::get('networks_enabled'))
|
||
Controller::error (ACCESS);
|
||
}
|
||
|
||
/**
|
||
* Index redirects to show all
|
||
*/
|
||
... | ... | |
'use_selector' => false
|
||
));
|
||
|
||
if ($this->acl_check_new('Devices_Controller', 'subnet'))
|
||
if ($this->acl_check_new('Subnets_Controller', 'subnet'))
|
||
{
|
||
$grid_subnets->add_new_button(
|
||
'subnets/add/' . $cloud_id, __('Add new subnet')
|
||
... | ... | |
|
||
$actions = $grid_subnets->grouped_action_field();
|
||
|
||
if ($this->acl_check_view('Devices_Controller', 'subnet'))
|
||
if ($this->acl_check_view('Subnets_Controller', 'subnet'))
|
||
{
|
||
$actions->add_action()
|
||
->icon_action('show')
|
||
... | ... | |
$cloud_model->transaction_rollback();
|
||
Log::add_exception($e);
|
||
// message
|
||
status::error('Error - cannot add cloud');
|
||
status::error('Error - cannot add cloud', $e);
|
||
}
|
||
}
|
||
|
||
... | ... | |
}
|
||
|
||
// check access
|
||
if (!$this->acl_check_delete('Clouds_Controller', 'clouds'))
|
||
if (!$this->acl_check_new('Clouds_Controller', 'clouds'))
|
||
{
|
||
Controller::error(ACCESS);
|
||
}
|
||
... | ... | |
$cloud_model->transaction_rollback();
|
||
Log::add_exception($e);
|
||
// message
|
||
status::error('Error - cannot add admin to cloud');
|
||
status::error('Error - cannot add admin to cloud', $e);
|
||
}
|
||
}
|
||
|
||
... | ... | |
}
|
||
|
||
// check access
|
||
if (!$this->acl_check_delete('Clouds_Controller', 'clouds'))
|
||
if (!$this->acl_check_new('Clouds_Controller', 'clouds'))
|
||
{
|
||
Controller::error(ACCESS);
|
||
}
|
||
... | ... | |
$cloud_model->transaction_rollback();
|
||
Log::add_exception($e);
|
||
// message
|
||
status::error('Error - cannot add subnet to cloud');
|
||
status::error('Error - cannot add subnet to cloud', $e);
|
||
}
|
||
}
|
||
|
||
... | ... | |
}
|
||
|
||
// check access
|
||
if (!$this->acl_check_delete('Clouds_Controller', 'clouds'))
|
||
if (!$this->acl_check_edit('Clouds_Controller', 'clouds'))
|
||
{
|
||
Controller::error(ACCESS);
|
||
}
|
Také k dispozici: Unified diff
Release 1.1.0