Currently, we only have one general permission to bypass validation.
We should introduce a new additional permission for users and update the validation.

if ($user->hasPermission('unique_field_perm_bypass') || $user->hasPermission('unique_field_perm_user_bypass')) {}

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

astonvictor created an issue. See original summary.

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

shubham_pareek_19’s picture

Status: Active » Needs review
matthew10’s picture

Assigned: Unassigned » matthew10
matthew10’s picture

Checked everything — all works as expected.
The new permission logic with unique_field_perm_bypass + unique_field_perm_user_bypass is functioning correctly.

matthew10’s picture

Assigned: matthew10 » Unassigned
Status: Needs review » Reviewed & tested by the community
astonvictor’s picture

Status: Reviewed & tested by the community » Needs work

merge conflict

matthew10’s picture

Assigned: Unassigned » matthew10
matthew10’s picture

Status: Needs work » Reviewed & tested by the community
astonvictor’s picture

Assigned: matthew10 » Unassigned
Status: Reviewed & tested by the community » Fixed

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.

Status: Fixed » Closed (fixed)

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