Commit 988dffb8 authored by Marcia Ibanez's avatar Marcia Ibanez Committed by João Ventura
Browse files

Issue #3058122 by marciaibanez, Guilherme Rabelo, maseyuk, jcnventura: Can't...

Issue #3058122 by marciaibanez, Guilherme Rabelo, maseyuk, jcnventura: Can't remove existing user login block
parent 14690ada
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -33,7 +33,7 @@ function tfa_help($route_name, RouteMatchInterface $route_match) {
function tfa_block_access(Block $block, $operation, AccountInterface $account) {
  // Remove access to the core user_login_block so we can replace with the TFA
  // login block.
  if (\Drupal::config('tfa.settings')->get('enabled') && $block->getPluginId() === 'user_login_block') {
  if (\Drupal::config('tfa.settings')->get('enabled') && $block->getPluginId() === 'user_login_block' && $operation != 'update' && $operation != 'delete') {
    return AccessResult::forbidden();
  }
  // No opinion.