Problem/Motivation

We want a specific user role to be unable to diverge from the defined URL alias pattern, this way we can enforce the use of a specific alias policy.

Proposed resolution

  • Introduce permissions to allow a role to disable automatic URL alias.
  • Make the checkbox for automatic URL alias on entity forms immutable.
  • This probably needs a update for existing installations, where the permissions should be turned on by default to prevent users on existing installations to be unable to change URL.

Remaining tasks

Dev.

Issue fork pathauto-3278532

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

nielsva created an issue. See original summary.

nvaken’s picture

Not sure why these tests failed, queued a retest.

berdir’s picture

Status: Active » Postponed (maintainer needs more info)

They fail because the test don't have that permission, so they don't work anymore.

I'm not really sure why this is needed.

The widget already checks for the existing core permission to create url aliases. See \Drupal\path\Plugin\Field\FieldType\PathFieldItemList::defaultAccess. If a user doesn't have them, the widget isn't shown at all but pathauto still works. You don't see anything, but with those permission, this is pointless, as users can just go and manually alter aliases.

nvaken’s picture

Hm... you might be right Berdir, I'll be reviewing our use case and get back here.

mably’s picture

Status: Postponed (maintainer needs more info) » Closed (outdated)

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.