diff --git a/code/DevTasks.php b/code/DevTasks.php index ed6a2c7..c327977 100644 --- a/code/DevTasks.php +++ b/code/DevTasks.php @@ -6,8 +6,11 @@ * @package DevTasks * */ -class DevTasks extends LeftAndMainExtension { +class DevTasks extends LeftAndMainExtension implements PermissionProvider { public function init() { + parent::init(); + if(!Permission::check("VIEW_DEVTASKS")) return; + $tasks = array( 'devbuild' => array( 'title' => 'Dev/Build', @@ -36,4 +39,10 @@ public function init() { CMSMenu::add_link($item, '', '#', $priority, $attributes); } } + + public function providePermissions() { + return array( + "VIEW_DEVTASKS" => "Access dev task menu", + ); + } }