Skip to content

Conversation

@wvangeit
Copy link
Contributor

@wvangeit wvangeit commented May 28, 2025

What do these changes do?

This adds permissions to the functions api. Tables are added to store the permissions for functions, function jobs and function job collections. A user or group can have read/write/execute permission.
For now the default is that a user immediately gets read/write/execute permission to their own functions. Nobody else can see them.

How to test

Run unit tests for webserver/apiserver

Create a function, try to read as other user. List functions, only see one's own functions.

@wvangeit wvangeit self-assigned this May 28, 2025
@wvangeit wvangeit added 🤖-automerge marks PR as ready to be merged for Mergify a:api framework api, data schemas, a:apiserver api-server service a:webserver webserver's codebase. Assigning the area is particularly useful for bugs a:database associated to postgres service and postgres-database package labels May 28, 2025
@wvangeit wvangeit added this to the Bazinga! milestone May 28, 2025
@wvangeit
Copy link
Contributor Author

@mergify queue

@mergify
Copy link
Contributor

mergify bot commented May 28, 2025

queue

✅ The pull request has been merged automatically

The pull request has been merged automatically at 540f786

@codecov
Copy link

codecov bot commented May 28, 2025

Codecov Report

Attention: Patch coverage is 71.87500% with 72 lines in your changes missing coverage. Please review.

Project coverage is 86.73%. Comparing base (2350f9a) to head (3dfd738).
Report is 1 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #7764      +/-   ##
==========================================
- Coverage   86.79%   86.73%   -0.07%     
==========================================
  Files        1846     1758      -88     
  Lines       71578    69256    -2322     
  Branches     1215     1061     -154     
==========================================
- Hits        62125    60068    -2057     
+ Misses       9112     8883     -229     
+ Partials      341      305      -36     
Flag Coverage Δ
integrationtests 64.28% <25.47%> (-0.15%) ⬇️
unittests 86.48% <71.87%> (-0.06%) ⬇️
Components Coverage Δ
api ∅ <ø> (∅)
pkg_aws_library ∅ <ø> (∅)
pkg_dask_task_models_library ∅ <ø> (∅)
pkg_models_library 93.14% <100.00%> (+0.05%) ⬆️
pkg_notifications_library 85.26% <ø> (ø)
pkg_postgres_database 88.16% <100.00%> (+0.08%) ⬆️
pkg_service_integration 69.92% <ø> (ø)
pkg_service_library 71.85% <0.00%> (-0.02%) ⬇️
pkg_settings_library ∅ <ø> (∅)
pkg_simcore_sdk 85.09% <ø> (+0.05%) ⬆️
agent 96.29% <ø> (ø)
api_server 91.78% <94.73%> (+<0.01%) ⬆️
autoscaling 96.03% <ø> (ø)
catalog 92.25% <ø> (ø)
clusters_keeper 99.13% <ø> (ø)
dask_sidecar 91.67% <ø> (ø)
datcore_adapter 97.94% <ø> (ø)
director 76.73% <ø> (ø)
director_v2 91.09% <ø> (-0.05%) ⬇️
dynamic_scheduler 96.69% <ø> (ø)
dynamic_sidecar 90.08% <ø> (ø)
efs_guardian 89.65% <ø> (ø)
invitations 93.00% <ø> (ø)
payments 92.57% <ø> (ø)
resource_usage_tracker 88.98% <ø> (ø)
storage 87.53% <ø> (ø)
webclient ∅ <ø> (∅)
webserver 83.71% <55.41%> (-0.24%) ⬇️

Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 2350f9a...3dfd738. Read the comment docs.

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

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.

Nice job. Left some suggestions.
Please double check and consider my comments about products and using group-based (instead of group or user) access rights.

@wvangeit wvangeit removed the 🤖-automerge marks PR as ready to be merged for Mergify label May 28, 2025
@wvangeit wvangeit added the 🤖-automerge marks PR as ready to be merged for Mergify label May 28, 2025
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.

Looks OK to me.

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.

Thanks! This PR looks great overall, and I don’t want to block it.

Just a quick reminder about the issue with the products — as mentioned earlier, it might be safer for now to limit the function API endpoints only to the osparc product. That way, we can avoid potential complications later on.

@sonarqubecloud
Copy link

@mergify mergify bot merged commit 540f786 into ITISFoundation:master May 30, 2025
94 of 96 checks passed
@wvangeit wvangeit deleted the func_user_permissions branch May 30, 2025 10:37
@matusdrobuliak66 matusdrobuliak66 mentioned this pull request Jun 6, 2025
92 tasks
@matusdrobuliak66 matusdrobuliak66 mentioned this pull request Aug 5, 2025
88 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🤖-automerge marks PR as ready to be merged for Mergify a:api framework api, data schemas, a:apiserver api-server service a:database associated to postgres service and postgres-database package a:webserver webserver's codebase. Assigning the area is particularly useful for bugs

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants