-
Notifications
You must be signed in to change notification settings - Fork 32
Function user permissions ✨ 🗃️ #7764
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
Function user permissions ✨ 🗃️ #7764
Conversation
|
@mergify queue |
✅ The pull request has been merged automaticallyThe pull request has been merged automatically at 540f786 |
Codecov ReportAttention: Patch coverage is
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
Continue to review full report in Codecov by Sentry.
🚀 New features to boost your workflow:
|
.../src/simcore_postgres_database/migration/versions/d3982ce629b9_add_function_access_rights.py
Outdated
Show resolved
Hide resolved
.../src/simcore_postgres_database/migration/versions/d3982ce629b9_add_function_access_rights.py
Outdated
Show resolved
Hide resolved
...ibrary/src/servicelib/rabbitmq/rpc_interfaces/webserver/functions/functions_rpc_interface.py
Show resolved
Hide resolved
services/api-server/src/simcore_service_api_server/api/routes/function_jobs_routes.py
Outdated
Show resolved
Hide resolved
pcrespov
left a comment
There was a problem hiding this 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.
…mcore into func_user_permissions
…mcore into func_user_permissions
GitHK
left a comment
There was a problem hiding this 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.
services/web/server/tests/unit/with_dbs/04/functions_rpc/test_functions_controller_rpc.py
Show resolved
Hide resolved
pcrespov
left a comment
There was a problem hiding this 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.
|



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.