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

♻️ refactor project access rights 🗃️🚨 #6060

Conversation

matusdrobuliak66
Copy link
Contributor

@matusdrobuliak66 matusdrobuliak66 commented Jul 12, 2024

What do these changes do?

  • ♻️ Refactor project access rights (New table project_to_groups was created 🗃️)
  • Highlights:
    • When you interact with project access rights new endpoints must be used:
      • POST /projects/<project-id>/groups/<group-id>
      • PUT /projects/<project-id>/groups/<group-id>
      • DELETE /projects/<project-id>/groups/<group-id>
    • When a project or template is created project owner access rights are populated automatically in the DB
    • When projects are listed the interface doesn't change, the client still gets access rights as before

Breaking change !! @odeimaiz

  • Project Patch and Put will no longer support updating project access rights (even though I have kept it for now there, these values will go out of sync soon and will be fully removed, therefore new /projects/<project-id>/groups endpoints needs to be used!

Related issue/s

How to test

Dev-ops checklist

@matusdrobuliak66 matusdrobuliak66 changed the title ♻️ refactor project access rights 🗃️ WIP: ♻️ refactor project access rights 🗃️🚨 Jul 12, 2024
@matusdrobuliak66 matusdrobuliak66 self-assigned this Jul 12, 2024
Copy link

codecov bot commented Jul 12, 2024

Codecov Report

Attention: Patch coverage is 91.32231% with 21 lines in your changes missing coverage. Please review.

Project coverage is 88.1%. Comparing base (cafbf96) to head (7d624f9).
Report is 355 commits behind head on master.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff            @@
##           master   #6060      +/-   ##
=========================================
+ Coverage    84.5%   88.1%    +3.5%     
=========================================
  Files          10    1442    +1432     
  Lines         214   59383   +59169     
  Branches       25    1409    +1384     
=========================================
+ Hits          181   52345   +52164     
- Misses         23    6742    +6719     
- Partials       10     296     +286     
Flag Coverage Δ
integrationtests 64.8% <58.4%> (?)
unittests 86.2% <89.6%> (+1.6%) ⬆️

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

Files Coverage Δ
...core_postgres_database/models/project_to_groups.py 100.0% <100.0%> (ø)
...e/src/simcore_postgres_database/models/projects.py 100.0% <100.0%> (ø)
...service_webserver/garbage_collector/_core_utils.py 83.8% <100.0%> (ø)
...e_service_webserver/projects/_comments_handlers.py 99.0% <100.0%> (ø)
...rc/simcore_service_webserver/projects/_db_utils.py 97.1% <100.0%> (ø)
.../projects/_projects_nodes_pricing_unit_handlers.py 97.3% <100.0%> (ø)
...re_service_webserver/projects/_wallets_handlers.py 98.1% <100.0%> (ø)
...rver/src/simcore_service_webserver/projects/api.py 100.0% <100.0%> (ø)
...erver/src/simcore_service_webserver/projects/db.py 97.3% <100.0%> (ø)
...c/simcore_service_webserver/projects/exceptions.py 94.8% <100.0%> (ø)
... and 6 more

... and 1388 files with indirect coverage changes

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.

I guess still WIP, right? Please re-assign for review when ready. thx

@matusdrobuliak66 matusdrobuliak66 marked this pull request as draft July 12, 2024 16:16
@matusdrobuliak66
Copy link
Contributor Author

I guess still WIP, right? Please re-assign for review when ready. thx

yes, sorry it should be Draft

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.

same here ;) see you!

Copy link
Contributor

@GitHK GitHK left a comment

Choose a reason for hiding this comment

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

ask again when done (clearing notification)

@matusdrobuliak66 matusdrobuliak66 marked this pull request as ready for review July 16, 2024 16:11
….com:matusdrobuliak66/osparc-simcore into is716/move-access-rights-from-projects-table
Copy link
Member

@odeimaiz odeimaiz left a comment

Choose a reason for hiding this comment

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

Alles klar, merci!

Copy link
Contributor

@bisgaard-itis bisgaard-itis left a comment

Choose a reason for hiding this comment

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

Very nice. Thanks a lot for the effort! Just a few suggestions

Copy link
Contributor

@GitHK GitHK left a comment

Choose a reason for hiding this comment

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

Thanks for the massive effort here.
I think we're almost there. Please consider my suggestions below.
Especially the one regarding the table name.

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.

Left some suggestions. Please consider them before merging
Thx for the great effort.

Copy link
Contributor

@GitHK GitHK left a comment

Choose a reason for hiding this comment

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

approved as requested

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Maintenance: move access_rights column in projects to a separate table
6 participants