Skip to content
Snippets Groups Projects

Check term view access before trying to redirect after an update

Closed dpi requested to merge issue/drupal-3470876:3470876-term-view-access-before-redirect into 11.x
1 unresolved thread

Closes #3470876

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • 590 $this->drupalGet($term->toUrl('edit-form'));
    591 $this->submitForm(edit: [], submit: 'Save');
    592
    593 // Updating a term sends user to view the term.
    594 $this->assertSession()->addressEquals($term->toUrl()->toString());
    595 $this->assertSession()->pageTextContains('Updated term');
    596
    597 // Unless the term is not accessible to the user.
    598 // Label triggers forbidden in taxonomy_test_entity_access().
    599 $term = Term::create(['vid' => $this->vocabulary->id(), 'name' => 'Inaccessible view']);
    600 $term->save();
    601 $this->drupalGet($term->toUrl('edit-form'));
    602 $this->submitForm(edit: [], submit: 'Save');
    603
    604 // In which case, the edit form is reloaded.
    605 $this->assertSession()->addressEquals($term->toUrl('edit-form'));
  • Adam Bramley added 1 commit

    added 1 commit

    Compare with previous version

  • dpi added 1 commit

    added 1 commit

    Compare with previous version

  • dpi added 9 commits

    added 9 commits

    • c5d4f548...143acfe4 - 8 commits from branch project:11.x
    • cefa16ba - Merge branch '11.x' into 3470876-term-view-access-before-redirect

    Compare with previous version

  • Adam Bramley added 17 commits

    added 17 commits

    Compare with previous version

  • closed

  • Please register or sign in to reply
    Loading