-
Notifications
You must be signed in to change notification settings - Fork 501
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unpublished DvObjects' cards don't show for IpGroups contained within a group that has permission to view them. #3273
Comments
@kcondon - is that right? |
Yes, that's right, thanks |
Yesterday I replicated the problem (IP groups within explicit groups are not honored) but I'm blocked on having a new method to call to collects even more groups. From chatting with @michbarsinai in Slack it sounds like one should supply a |
@michbarsinai as of 18e1037 in the 1380-honor-ip-groups this is how the method looks in GroupServiceBean that would need to be enhanced:
That is to say, this is the method that SearchServiceBean relies on to gather as many groups as possible for the Here's a handy link to the method above: dataverse/src/main/java/edu/harvard/iq/dataverse/authorization/groups/GroupServiceBean.java Line 138 in 18e1037
Also related to "groups within groups" is this issue about MyData: #3056 |
Oh, my other thought on this issue to simply stop supporting "groups within groups". They're a little buggy as currently implemented and I wonder if they're more trouble than they're worth. |
@michbarsinai - we are trying to get the IP Group fixes in 4.5.1 but this method update is blocking this issue. What are your thoughts? Do you have time to work on it or should we take a stab at it on this side? Thanks! |
@michbarsinai awesome! Thanks much. |
Method implemented. As the See unit test for sample usage. In the context of this issue, I think it would be enough to replace |
@michbarsinai I'm having good luck with the new
@michbarsinai there's still an issue the branch we're working on is behind "develop". Unfortunately, there are merge conflicts so pull request #3103 can't be merged. I'll take a swing at getting the branch up to date with "develop" and I'll ping you if I'm unclear about how to handle any of the merge conflicts. |
Conflicts: src/main/java/edu/harvard/iq/dataverse/api/Admin.java src/main/java/edu/harvard/iq/dataverse/util/json/JsonPrinter.java src/test/java/edu/harvard/iq/dataverse/util/json/JsonParserTest.java As of 1f5fcfe and earlier (not sure how far back) this branch cannot be merged with develop since develop advanced with the release of 4.5 (pull request #3308 especially was merged in). A simple `git merge develop` yielded merge conflics, especially with JsonPrinter.java and I was unable to resolve them using Netbeans. (I had to run `git merge --abort` after three attempts.) I decided to revert JsonPrinter.java to its state in 4.5 with `git checkout dc58ae1 src/main/java/edu/harvard/iq/dataverse/util/json/JsonPrinter.java` and then manually copy the changes needed to get the app to compile from the `1380-honor-ip-groups` branch (specifically https://github.com/IQSS/dataverse/blob/2ada66142fd8fca3a61da4db46268cfba650e4a9/src/main/java/edu/harvard/iq/dataverse/util/json/JsonPrinter.java ). I tried to get all the changes but it's possible I missed some. `public static JsonObjectBuilder json( IpGroup grp )` especially had some changes having to do with `List<List<String>> ranges = grp.getRanges().stream().filter( rng -> !rng.isSingleAddress()` and such. It looks like this change happened in a336475. The commit message starts with "IP group json format now supports single addresses". I opened #3340 to revisit this part of the code or at least to test and document how it's supposed to work. Meanwhile, I tested #3273 which is what I'm actually working on and the "groups within groups" bug seems to be fixed both before and after the merge.
Ok, resolving the merge conflict was pretty thorny and resulting in me opening #3340 and leaving a long comment in 80268c3 to explain what I did but both and before and after the merge this issue seems to have been fixed. Please see my last comment about "groups within groups" for how I've been testing. Passing to QA. |
OK, tested and it works now. |
Given a dataverse that:
Admin
role (call thateg
)eg
has an IpGroup as a member (we'll call thatipg
)When a user logs in from an IP address that's a member of
ipg
, she does not see the card of the unpublished dataset. Note that when the role is assigned toipg
directly, these cards are shown.The text was updated successfully, but these errors were encountered: