This modules seems to work well. Maybe too well. When logged in as admin, I cannot edit content translations if the language isn't enabled on the domain, not to mention view them. I can create new content translations, but that's it; when I save I'm redirected to the default language of the current domain. It would be great if there was a permission setting for admins (and content managers) to bypass this access restriction.

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:

Comments

markdc created an issue. See original summary.

radelson’s picture

+1 on the feature, that'd be very useful.

Not exactly sure what it does incur but we'll try conditionally loading the config override.

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

mtalt’s picture

Version: 8.x-1.x-dev » 2.0.x-dev
Status: Active » Needs review
jlbellido’s picture

Hello, I've applied the #4 patch submitted, it is a great starting point! However it doesn't work for me.

After debugging a bit I found out that the issue seems to be at:

  protected function initiateContext() {
    $this->contextSet = TRUE;

    $this->currrentUser = \Drupal::service('current_user')->hasPermission('bypass language restrictions');

Because initiateContext() is called once at the very beginning of the request where it seems the actual user is not loaded. Therefore, we always check the permissions against the Anonymous user.

Thanks!

jlbellido’s picture

I've provided a new MR which is really similar to #4 but it checks the permissions only when we are about to check the config names we might override.

For me, now \Drupal::service('current_user') is loaded with the valid user.

Cheers

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

rajeshreeputra’s picture

Status: Needs review » Fixed

Thank you for working on this, merged, release will follow shortly.

Status: Fixed » Closed (fixed)

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