At the moment, the only permission available in this module applies to all taxonomies.

Ideally, separate permissions per taxonomy were available, such as taxonomy_access_fix provides for adding terms, or alternatively the edit and/or delete permission would be checked in addition to the merge permission.

Comments

grahl created an issue. See original summary.

grahl’s picture

I don't have time to work on a patch for this myself at the moment but maybe someone else also has an interest in this.

legolasbo’s picture

Status: Active » Needs work
StatusFileSize
new5.69 KB

I think the approach where we combine the 'merge taxonomy terms' with the 'edit terms in *' permissions is probably the best. The merging of terms should count as editing them, because any references to them get updated in the process.

This patch adds tests for that use case and are obviously failing. I'll upload another patch with the actual implementation shortly.

legolasbo’s picture

Status: Needs work » Needs review
StatusFileSize
new2.48 KB
new8.17 KB

Attached patch implements the additional access check.

marcoweijenborg’s picture

I can only see 2 small things here:

1. In src/Access/MergeAccess.php, there is too much whitespace between the <?php tag and the namespace directive.
2. The same in tests/src/Functional/TermMergeTestBase.php: too much whitespace around the namespace directive.

The rest seems ok to me :)

marcoweijenborg’s picture

Status: Needs review » Needs work
legolasbo’s picture

Status: Needs work » Needs review
StatusFileSize
new2.12 KB
new8.29 KB

Thanks for your review! Looking at this again I found some other improvements besides the ones you mentioned. See the attached patch :)

marcoweijenborg’s picture

Ok looks good!

marcoweijenborg’s picture

Status: Needs review » Reviewed & tested by the community
legolasbo’s picture

Status: Reviewed & tested by the community » Fixed

Committed and pushed 8.x-1.x

  • legolasbo committed 0a57094 on 8.x-1.x
    Issue #2984402 by legolasbo, marcoweijenborg: Provide per-vocabulary...

Status: Fixed » Closed (fixed)

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