Problem/Motivation
On a taxonomy term reference field, the Other option is currently available to all users. It should only be available to those who are able to access to the vocab.
Proposed resolution
Check if the current user has createAccess first and only show the Other option if they do.
| Comment | File | Size | Author |
|---|---|---|---|
| #12 | reroll_diff_3207231_6-12.txt | 12.38 KB | andregp |
| #12 | 3207231-12.patch | 9.64 KB | andregp |
| #6 | 3207231.patch | 4.4 KB | beatrizrodrigues |
| #2 | select_or_other-permissions_access-3207231-1.patch | 4.44 KB | nyanmar |
Issue fork select_or_other-3207231
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
Comment #2
nyanmar commentedComment #3
nyanmar commentedComment #6
beatrizrodriguesI did the reroll of the previous patch.
Comment #7
daften commentedHi,
For a patch like this, we'd definitely need updated tests, can this be included in the patch please?
Comment #8
matheusmaciel commentedI'll try to work on it, and maybe I can update the tests as well.
Comment #9
matheusmaciel commentedComment #10
WagnerMelo commentedHi, I'll try work in this issue.
Comment #11
WagnerMelo commentedComment #12
andregp commentedWe needed to reroll the patch first to then update the tests. We also improved a bit the comments and CS of the code being added to the issue. The tests passed locally, I hope it will pass on the bot too.
Please also credit @WagnerMelo as he worked with me on this patch.
Comment #13
aldairsoares commentedI'm going to review it.
Comment #14
aldairsoares commentedI have made some tests with two different permissions and everything looks ok.
I'm going to change this issue to RTBC.
Comment #15
andregp commentedI'm sorry. I didn't notice based the patch on the wrong branch. I'll do a reroll for 8.x-1
Comment #16
andregp commentedThe reroll I did to create #12 was not necessary, I wasn't able to apply patch #6 because I was working on the wrong branch (4.x). So I rerolled patch #12 for 8.x-1.x and made a diff between this patch and patch #6.
Comment #17
andregp commentedSo, looking better to this issue and the module I believe that:
1. The test fails on patch #16 are not related to the patch itself, but the branch 8.x-1 tests are outdated. I'm sending a test patch with a single comment change. If it fails than my hypothesis is right.
2. This issue should be aimed to the 4.x branch as it is actually the most current patch and is probably the right one. If that's the case, then my patch #12 might be enough for the issue and we can probably move it back to RTBC as it was already reviewed by @aldairsoares. I'll wait the tests results to see what can be done here.
Comment #18
andregp commentedOkay, the test fails at #17 show that the banch 8.1-x is old and out of date, so I'm changing the issue branch to 4.x. I believe it can be moved again to RTBC as the patch #12 was already reviewed.
Comment #20
hmendes commentedThanks for the work :D
Comment #21
hmendes commented