Saved version of Acquia's Journal modules
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

25 lines
572 B

<?php
namespace Drupal\journal_references\Routing;
use Drupal\Core\Routing\RouteSubscriberBase;
use Symfony\Component\Routing\RouteCollection;
/**
* Listens to the dynamic route events.
*/
class RouteSubscriber extends RouteSubscriberBase {
/**
* {@inheritdoc}
*/
protected function alterRoutes(RouteCollection $collection) {
foreach (['bibcite_import.populate', 'bibcite_import.import'] as $routename) {
if ($route = $collection->get($routename)) {
$route->setRequirement('_permission', 'create bibcite_reference');
}
}
}
}