Problem/Motivation

We've seen in other modules some problems with published / unpublished translations, where suddenly either an unpublished translation being created was removing access for the published original node, or the other way around: saving an original node having unpublished translations was allowing access to everything.

The thing is core doesn't mind about a node's status if there are grants on the DB.

So let's write a test:

  1. create a published restricted node
  2. check access is ok
  3. create an unpublished translation
  4. check access is ok for both translations (original language is restricted, unpublished node does not have lines in the node_access table)
  5. publish the translation
  6. check access is ok (restricted for original and translation)
  7. unpublish the original
  8. check access is ok (nothing in DB for the original, restricted access for translation)
Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

  • 1.0.x Comparechanges, plain diff MR !7
  • 3466778-add-some-tests Comparecompare
  • 3466778_1.0.x Comparecompare

Comments

joey-santiago created an issue. See original summary.

vermario made their first commit to this issue’s fork.

joey-santiago’s picture

Working on this, we realized quite many things:

  • "view own unpublished" permission needed some special grant
  • "edit any CONTENT_TYPE content" permission needed some special grant

Doing this, we are writing a ton of tests.

joey-santiago’s picture

Status: Active » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.