Skip to content

Commit

Permalink
Allow full access to redirect.
Browse files Browse the repository at this point in the history
  • Loading branch information
LOBsTerr committed Mar 17, 2021
1 parent fbe7acb commit 82e9833
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions newsroom_connector.routing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,21 +15,21 @@ newsroom_connector.import:
requirements:
_permission: 'administer newsroom settings'

# Redirect to drupal entity based on give Newsroo mID.
# Redirect to drupal entity based on give Newsroom ID.
newsroom_connector.redirect:
path: '/newsroom-redirect/{type}/{newsroom_id}'
defaults:
_controller: 'Drupal\newsroom_connector\Controller\NewsroomConnectorController::redirectItem'
requirements:
_permission: 'administer newsroom settings'
_access: 'TRUE'

# BC the old format of redirect.
newsroom_connector.item_redirect:
path: '/news-redirect/{newsroom_id}'
defaults:
_controller: 'Drupal\newsroom_connector\Controller\NewsroomConnectorController::newsRedirect'
requirements:
_permission: 'administer newsroom settings'
_access: 'TRUE'

# List of available importers.
newsroom_connector.importers:
Expand Down
2 changes: 1 addition & 1 deletion src/Controller/NewsroomConnectorController.php
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ public function import($type, $newsroom_id) {
* Old redirection.
*/
public function newsRedirect($newsroom_id) {
return $this->redirect('item', $newsroom_id);
return $this->redirectItem('item', $newsroom_id);
}

/**
Expand Down

0 comments on commit 82e9833

Please sign in to comment.