-
Notifications
You must be signed in to change notification settings - Fork 3
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
Why am I getting all invitations, incl. the ones not assigned to me? #482
Comments
This could also be a CAWS bug. Let's have a look whether we have proper coverage of the Core part of this logic ... Seemingly not. It should be worthwhile adding a more complex invitation test here similar to the scenario you describe. Maybe a suitable small task for @yuanchen233 ? That way we can more easily determine whether it is CAWS or Core. |
@Whathecode - I'm a bit confused. Is this a bug in Core or CAWS? Above you point to a test case, but this doesn't reveal (at least to me) if something has to be "fixed" in Core. |
The code was sufficiently complex I couldn't quickly/easily rule it out as a core bug. It's missing test coverage to do so. I haven't looked into more detail. So best approach is adding such a test so we have future coverage, and we'll know whether it is core or CAWS. :) |
We don't have test case covering this scenario, thus can not tell if this is something need to be fixed in Core. I can look into this next. But, the description for getActiveParticipationInvitations states 'all participations', so does this imply this result is expected? |
It does qualify:
So, it shouldn't return participations from other account IDs. ;) |
I wrote a simple test case and Core implementation works as expected, |
Thank you @yuanchen233 Feel free to create a PR for the test case. It would still be relevant for core. Reassigned this as an "enhancement" (providing test coverage) rather than a bug. |
I just tested this on the new DEV deployment and now I only get the invitations I am supposed to get. |
Sure and thanks, I wanted to see if there are other situations/test cases can benefit from a more complex participant group as well, but didn't find anything right away. If this scenario can be re-used for testing other modules, I'll add it to |
…/devices A question arose whether the `getActiveParticipationInvitation()` endpoint returning multiple invitations was a CARP core bug, or a bug in the CARP platform (webservices). This unit test shows this works properly in CARP core. An exception to the detekt rule `DestructuringDeclarationWithTooManyEntries` for test sources was added, as overall it can help clean up otherwise distracting repetitive parts of test setup. Closes #482 --------- Co-authored-by: Steven Jeuris <[email protected]>
…/devices A question arose whether the `getActiveParticipationInvitation()` endpoint returning multiple invitations was a CARP core bug, or a bug in the CARP platform (webservices). This unit test shows this works properly in CARP core. An exception to the detekt rule `DestructuringDeclarationWithTooManyEntries` for test sources was added, as overall it can help clean up otherwise distracting repetitive parts of test setup. Closes #482 --------- Co-authored-by: Steven Jeuris <[email protected]>
I have made a family study with a father and a mother, and made a deployment with assignments to users like this:
So - Jakob is the "Mother" and Aamir is the "Father".
However, when I authenticate to CAWS as "Jakob" ([email protected]), I get the following invitations from the ParticipationService:
So - even though I autheticate as the "Mother" I get BOTH invitations????
This entails, that I (as a participant) could choose to be the Father, even though the researcher has assigned me the Mother role......
The text was updated successfully, but these errors were encountered: