Skip to content
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

🐛 fix services:access endpoint for product group #6213

Conversation

matusdrobuliak66
Copy link
Contributor

@matusdrobuliak66 matusdrobuliak66 commented Aug 19, 2024

What do these changes do?

  • Issue reported: #1540 A share permission warning is incorrectly popping up. The reason is that listing user groups filters out Products because Product groups are resources with Read access set to False. In a previous PR, I already prepared the groundwork for this fix by renaming the previous function list_all_user_groups to list_user_groups_with_read_access. The new function, list_all_user_groups, now correctly returns all groups of the user.

Related issue/s

How to test

pytest tests/unit/with_dbs/02/test_projects_nodes_handlers__services_access.py

Dev-ops checklist

@matusdrobuliak66 matusdrobuliak66 self-assigned this Aug 19, 2024
@matusdrobuliak66 matusdrobuliak66 added this to the Eisbock milestone Aug 19, 2024
@matusdrobuliak66 matusdrobuliak66 added the bug buggy, it does not work as expected label Aug 19, 2024
@matusdrobuliak66 matusdrobuliak66 marked this pull request as ready for review August 19, 2024 16:04
Copy link

codecov bot commented Aug 19, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 82.1%. Comparing base (cafbf96) to head (ef86d1a).
Report is 450 commits behind head on master.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff            @@
##           master   #6213      +/-   ##
=========================================
- Coverage    84.5%   82.1%    -2.5%     
=========================================
  Files          10     577     +567     
  Lines         214   29430   +29216     
  Branches       25     234     +209     
=========================================
+ Hits          181   24175   +23994     
- Misses         23    5195    +5172     
- Partials       10      60      +50     
Flag Coverage Δ
integrationtests 64.9% <33.3%> (?)
unittests 87.6% <100.0%> (+3.0%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files Coverage Δ
...core_service_webserver/projects/_nodes_handlers.py 91.1% <100.0%> (ø)

... and 586 files with indirect coverage changes

Copy link
Collaborator

@elisabettai elisabettai left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeeeeeeeeeeeeah. 🎉 🎉 🎉
Also see the same case on fogbugz (we should tag it properly when this one goes to staging): https://z43.manuscript.com/f/cases/202180/Wrong-message-when-sharing-a-project-on-sim4life-io-science

Copy link
Member

@pcrespov pcrespov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you pls create a test that reproduces #1540?
The test should fail with the previous version and pass with your fix

Copy link
Member

@sanderegg sanderegg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it would be good, if that is an expected behavior, that there is a test for it. Otherwise anyone might inadvertently break it.

@matusdrobuliak66 matusdrobuliak66 enabled auto-merge (squash) August 19, 2024 18:02
Copy link

@matusdrobuliak66 matusdrobuliak66 merged commit 7a98157 into ITISFoundation:master Aug 19, 2024
57 checks passed
@odeimaiz
Copy link
Member

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug buggy, it does not work as expected
Projects
None yet
Development

Successfully merging this pull request may close these issues.

🐛 Wrong sharee permission - if shared with product group
5 participants