Closed (fixed)
Project:
Taxonomy Permissions
Version:
8.x-1.x-dev
Component:
Code
Priority:
Major
Category:
Task
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
2 Nov 2015 at 01:10 UTC
Updated:
18 May 2023 at 22:18 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
flocondetoileI can give a try on a first port to D8.
I have some questions about how using the view permissions added on each vocabulary.
1. We can override the control Access class for each vocabulary, and then manage access to the taxonomy term at a low level. This means that if a user don't have permissions to view terms of a vocabulary, terms attached to a content (for example tags in the article content type) won't be displayed in the node
2. We can manage control access for each terms in vocabulary at a higher level, using event system, and prevent users who don't have permissions to view terms in a vocabulary to access to the taxonomy term page. But they will be able to view terms displayed in a node page
Any thought ?
Comment #3
flocondetoile@salvis could you create a 8.x-1.x branch ?
Comment #4
salvisGreat, welcome flocondetoile!
And thank you for your offer to help, Francewhoa!
I've just created the 8.x-1.x branch.
The front page says this about TP:
So, to be consistent, #1 is the way to go.
Would #2 be useful? If term references are shown as links, this would mean converting them to plain text. I guess if we wanted to see term references, we could add a second set of permissions, something like see terms in vocabulary, but this would be a new feature.
If you want, feel free to post a feature request for #2, then we can see whether there's any interest, but I'd prefer to just go with the existing functionality first.
Comment #5
flocondetoileOK. Let's give a try and launch the tests included in the patch.
@salbis. Seems i can't launch the tests with 8.x-1.x (I've got only 7.x-1.x in the select list to launch test) ?
Comment #6
flocondetoileSorry. Empty file. New patch attached.
Edit: Test will failed as they run against 7.x
Comment #8
flocondetoileComment #9
salvisSorry, I had to enable testing for D8 — and it passed!
There's a problem here. Seems like your editor wrapped the lines in the middle of string constants.
Maybe this happened in other places, too.
Many tools don't like that.
Comment #10
flocondetoileThanks for you feedback. I fixed issues mentionned. Patch attached.
Comment #11
flocondetoileLet's the bot test it.
Comment #12
guysaban commentedHi, I wanted to try this new module but the D8 module link looks like Drupal 7 module but is the info files says its D8.
How to I apply the patch if there is no src folder?
Comment #13
salvis@guysaban: Thank you for your interest, but your "D8 module link" points to a completely different module...
Comment #14
dravenkI tested this patch. People got the 404 message if people without access permission. Change the state to the RTBC.
Comment #15
rob c commentedBut the patch needs more work i believe.
I see unused 'use' statements and some other coding style issues, tests are simpletests, etc.
I'm updating the patch right now (see how far i'll get today).
Comment #16
dravenkLittle work
Comment #17
rob c commentedAnd a bit more work, including #16.
Moves tests to unit>functional (the start).
Other minor coding style issues (use phpcs to test).
Comment #19
rob c commented21:23:25 Attempting to connect to database server.
21:23:26 Could not connect to database server.
To bad, they work locally.
Comment #20
rob c commentedComment #21
rob c commented@salvis we'r still testing with php 5.5?
Comment #23
dravenk@Rob C
thanks for work in this.
I'm learning and do a small little work for this.
make more green.
Comment #24
salvisYes, D8 supports PHP 5.5: https://www.drupal.org/docs/7/system-requirements/php
And that doesn't seem to be the roadblock.
Thanks to all for working on this!
Comment #25
anybodyShould this perhaps be combined into taxonomy_access_fix module for Drupal 8? See #2949043: Add missing "View terms in %vocabulary" permission
Comment #26
anybodyIs there an active maintainer willing to maintain the D8 branch? Wouldn't it make sense to commit the latest patch to the 8.x-1.x-dev branch? Currently that contains D8 code which is even a worse starting point? Patches would become smaller and more readable then?
Comment #27
salvisYes, that could be a way to go.
Well, I would like to have a green patch...
Let's try this...
Comment #29
salvisDoes anyone have an idea why the D8.4.5 test fails?
P.S. DON'T try to rerun the test on the patch, because #27 obviously cannot be applied a second time after it has been committed.
Comment #30
salvisComment #31
anybodyFYI: #2949043: Add missing "View terms in %vocabulary" permission was just fixed :) So you may choose now!
Comment #32
rob c commented@salvis could you trigger a test with 8.3? Got an idea why it fails, see if the testbot agrees.
Comment #33
salvisThe testbot doesn't support 8.3 anymore, only 8.4 to 8.6, at this point.
8.5.0 passed and is now the stable version, so I guess we don't need to worry about 8.4 anymore.
Comment #34
rob c commentedTo bad, i can retest still with 8.3 on some projects.
And prolly true, 8.4 is out anyway, but for the people still looking.
I think it's because of an issue fixed in 8.2 for minor issues with cache tags (forgot the issue number). In 8.5 another patch was added to core for this, that's why 8.5 does not break anymore i believe.
Comment #36
francewhoaThanks all for your contributions :)
This is a note to myself. I updated this ticket attribution tags.
Comment #37
sebaz commentedWhen release, maybe D9 compatibility is only change in info.yml?
code on git https://git.drupalcode.org/project/taxonomy_permissions/-/tree/8.x-1.x/
Comment #38
rossidrup commentedis this module ready for drupal 9 and commerce? to hide products with specific terms?
Comment #39
raajkumar.kuruHere is the Patch for Drupal 10