Samuel Georges 57f32d0055 Adds basic permissions for media manager - Fixes #1134
Note if media management is restricted, it can still be accessed via the Rich Editor - we need to address this concern later. This change is to allow the menu item to be toggled on/off.
2015-06-27 11:50:46 +10:00

35 lines
710 B
PHP

<?php namespace Cms\Controllers;
use BackendMenu;
use Backend\Classes\Controller;
use Cms\Widgets\MediaManager;
/**
* CMS Media Manager
*
* @package october\cms
* @author Alexey Bobkov, Samuel Georges
*/
class Media extends Controller
{
public $requiredPermissions = ['media.*'];
/**
* Constructor.
*/
public function __construct()
{
parent::__construct();
BackendMenu::setContext('October.Cms', 'media', true);
$this->pageTitle = 'cms::lang.media.menu_label';
$manager = new MediaManager($this, 'manager');
$manager->bindToController();
}
public function index()
{
$this->bodyClass = 'compact-container';
}
}