-
Notifications
You must be signed in to change notification settings - Fork 32
Add permission function service layer methods 🎨 #8211
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
Conversation
services/web/server/src/simcore_service_webserver/functions/_functions_repository.py
Show resolved
Hide resolved
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.
Pull Request Overview
This PR exposes two new service layer methods (set_function_group_permissions and remove_function_group_permissions) to manage group permissions for functions, preparing for function sharing in the function browser.
Key changes include:
- Adding new permission management methods in the functions service layer
- Refactoring existing permission functions to support both internal and external use
- Adding comprehensive test coverage for the new permission functionality
- Minor import organization improvements
Reviewed Changes
Copilot reviewed 8 out of 12 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
test_functions_service.py |
New test file validating permission setting and removal functionality |
_functions_service.py |
Added two new public methods for group permission management |
_functions_repository.py |
Refactored permission functions, added user permission checks and new remove functionality |
test_functions_controller_rpc.py |
Removed unnecessary blank lines and import comments |
studies_jobs.py |
Removed unnecessary pylint disable comment |
functions_routes.py |
Reorganized imports to use relative imports |
function_jobs_routes.py |
Reorganized imports to use relative imports |
function_job_collections_routes.py |
Added limited_gather import and reorganized other imports |
You can also share your feedback on Copilot code review for a chance to win a $100 gift card. Take the survey.
services/web/server/src/simcore_service_webserver/functions/_functions_repository.py
Show resolved
Hide resolved
services/web/server/src/simcore_service_webserver/functions/_functions_repository.py
Show resolved
Hide resolved
services/web/server/src/simcore_service_webserver/functions/_functions_repository.py
Show resolved
Hide resolved
matusdrobuliak66
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! left a comment
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## master #8211 +/- ##
==========================================
- Coverage 86.59% 86.23% -0.36%
==========================================
Files 1910 852 -1058
Lines 73365 37950 -35415
Branches 1301 176 -1125
==========================================
- Hits 63529 32727 -30802
+ Misses 9448 5165 -4283
+ Partials 388 58 -330
Continue to review full report in Codecov by Sentry.
🚀 New features to boost your workflow:
|
🧪 CI InsightsHere's what we observed from your CI run for 07dc539. ✅ Passed Jobs With Interesting Signals
|
|
@mergify queue |
🟠 Waiting for conditions to match
|
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.
OK with me
...ices/api-server/src/simcore_service_api_server/api/routes/function_job_collections_routes.py
Outdated
Show resolved
Hide resolved
|
bisgaard-itis
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 a lot!
|
@mergify refresh |
✅ Pull request refreshed |



What do these changes do?
This is in preparation for the sharing of functions in the function browser. I expose two methods in the function service layer to change and remove group permissions for functions.
(It also a few small changes based on comments in a previous PR that i forgot to commit).
Related issue/s
ITISFoundation/osparc-issues#1905
How to test
There is a new test file for the service layer (without rpc).
Register a function, give another group access, test if they have access, remove the access, test if they don't have access anymore.
Dev-ops
No changes