Skip to content

Commit

Permalink
Merge pull request #25 from quantcdn/8.x-tabs-hotfix
Browse files Browse the repository at this point in the history
Add token check to tab removal.
  • Loading branch information
stooit authored Jul 28, 2021
2 parents 2f4c494 + a660901 commit 8a8007b
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions quant.module
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,10 @@ use Symfony\Component\HttpKernel\Exception\ServiceUnavailableHttpException;
* Implements hook_menu_local_tasks_alter().
*/
function quant_menu_local_tasks_alter(&$data, $route_name) {
if (!\Drupal::requestStack()->getCurrentRequest()->headers->get('quant-token')) {
return;
}

if (\Drupal::currentUser()->isAnonymous()) {
unset($data['tabs']);
}
Expand Down

0 comments on commit 8a8007b

Please sign in to comment.