Closed (outdated)
Project:
Group
Version:
8.x-1.x-dev
Component:
Group Node (gnode)
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
7 Dec 2017 at 00:04 UTC
Updated:
25 Sep 2020 at 11:52 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
yovincepatch attached
Comment #3
yovinceComment #5
yovinceThis is better one.
Comment #6
rjg commented#5 is working for me (Drupal Core 8.4)
Comment #7
gleroux02 commentedConfirmed that #5 is also working for me with Drupal Core 8.4.5
Comment #8
dpagini commentedI see a few "this is working for me" here, so I'm going to bump this to RTBC status to hopefully get a maintainer review. I am utilizing this patch in the same project as @rjgwiz, above.
Comment #9
dpagini commentedAnother bump to the top of the issue queue. Could we get some guidance on this patch and if it needs anything to be considered for this project?
Comment #10
kristiaanvandeneyndeThis is definitely a bug and should be fixed. However, we have test coverage for the grants, so we need to update those tests proving that the code is currently broken. Feel like you're up for the task @yovince?
Comment #11
alxshell commentedHi all,
I have encountered this bug as well and for my usecase it is a showstopper. So how can I help to get this bug into the next release?
Comment #12
alxshell commentedI tried to apply the patch to 8.x-1.0-rc4 and it failed... I corrected it to work with 8.x-1.0-rc4. What to do next?Sry... I made a mistake. Patch from #5 do apply even for 8.x-1.0-rc4.
Comment #13
jordik commentedComment #14
garphyAccess checks must be disabled for the query which list all the groups the user is NOT part of otherwise, depending on site permission configuration, they won't be considered.
Other than that, it indeed seem to resolve issues I got with outsider permissions not being enforced.
Comment #15
dpagini commentedBased on #10, adding "Needs Tests" tag.
Comment #16
garphyThis patch fixes an issue introduced by the original patch : the
$role_idsarray holding all outsider role identifiers must be reinitialized for each considered group type otherwise we're giving user some grants it shouldn't have.Comment #17
lobsterr commentedAdded test cases for advanced outsider roles
Comment #18
kristiaanvandeneyndePlease verify if #3102384: Make node grants actually use the new permission calculators. fixed this for you by trying the latest dev (or RC5 which goes out today). If it does, we should still commit @LOBsTerr's extra test coverage in this issue.
Comment #19
ayalon commentedWhy was the line
$query->accessCheck(FALSE);
introduced?
I mean, this basically disabled the access check isn't it?
Comment #20
knowak commentedThis looks to still be an issue in RC5 as I have a similar issue as https://www.drupal.org/project/group/issues/3101139 where views are not displaying the content to outsiders even though they have permission to view them.
Comment #21
grndlvl commented#3102384: Make node grants actually use the new permission calculators. Does not resolve this issue. However, #17 fixes this issue.
@ayalon The reason that
$query->accessCheck(FALSE);was added was to retrieve all groups of which the user is not a member. This then loops through everything and checks the outsider permissions and if and only if the outsider permission is set for the group then the outside group is added to the user's node grants.This works! Thanks everyone!
Comment #22
gorkagr commentedHi, latest patch cannot be applied into the latest version of the module (RC5 nor dev) due to changes made in #3102384
(I dont know if RC5 fixed this or not though)
Comment #23
coderdan commentedRe-rolled for rc5.
Comment #24
webdrips commentedI can confirm the re-roll applied cleanly and worked for me.
Comment #25
strozx commentedHello, it works for me too. Thanks
Comment #26
kristiaanvandeneyndeFYI: I am working on #3134072: Implement the query access handling for grouped entities. When (not if) that lands, there's a high likelihood I will completely remove node grants from gnode in favor of this new system. The only change will be deleting a lot of code as this system would take over "automagically". So there is a very small chance this will get committed as the next release will be 1.0 and is set to include the query access handlers.
In the meantime, if the patch here works for you: Great!
Comment #27
kristiaanvandeneyndeNode grants are now (finally) gone from the module and the new query access layer properly runs access checks across the board (regardless of language). Please verify with the latest dev version.
Comment #28
kristiaanvandeneynde