-
Notifications
You must be signed in to change notification settings - Fork 32
✨ Support Center: Gives Read Access to Support Users to User Accounts and Product Details #8313
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
✨ Support Center: Gives Read Access to Support Users to User Accounts and Product Details #8313
Conversation
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## master #8313 +/- ##
==========================================
+ Coverage 79.47% 88.26% +8.79%
==========================================
Files 1561 1526 -35
Lines 61010 63191 +2181
Branches 801 499 -302
==========================================
+ Hits 48487 55776 +7289
+ Misses 12311 7286 -5025
+ Partials 212 129 -83
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 6baa179. ❌ Job Failures
✅ Passed Jobs With Interesting Signals
|
40a7ec5 to
d8258b1
Compare
PRODUCT_SUPPORT Role with Read Access to User Accounts and Product Details
|
After discussing with @odeimaiz, we decided to remove the
In the UI, support groups should be clearly distinguished: they are not just resource-sharing organizations, but also provide extended access.
|
services/web/server/src/simcore_service_webserver/security/_authz_access_roles.py
Outdated
Show resolved
Hide resolved
7948ec9 to
eb68d9b
Compare
PRODUCT_SUPPORT Role with Read Access to User Accounts and Product DetailsThere 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 introduces a new PRODUCT_SUPPORT user role that provides read-only access to user accounts and product details for support teams. The implementation extends the existing permission system to support both role-based and group-based authorization.
- Adds
PRODUCT_SUPPORTrole with specific read permissions for user accounts and product details - Implements hybrid authorization allowing access via either user role OR group membership
- Updates REST endpoints to use the new permission decorator for flexible access control
Reviewed Changes
Copilot reviewed 16 out of 17 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| services/web/server/src/simcore_service_webserver/security/decorators.py | Adds new group_or_role_permission_required decorator for hybrid authorization |
| services/web/server/src/simcore_service_webserver/security/_authz_access_roles.py | Defines permissions for PRODUCT_SUPPORT role and introduces group-based permissions mapping |
| services/web/server/src/simcore_service_webserver/users/_controller/rest/accounts_rest.py | Updates user account endpoints to use hybrid authorization decorator |
| services/web/server/src/simcore_service_webserver/products/_controller/rest.py | Updates product details endpoint to use hybrid authorization decorator |
| services/web/server/src/simcore_service_webserver/users/_accounts_repository.py | Adds username lookup for account reviewers instead of just user IDs |
| packages/models-library/src/models_library/users.py | Refactors UserNameID type definition to use proper string constraints |
| packages/models-library/src/models_library/api_schemas_webserver/users.py | Updates UserAccountGet model to use UserNameID for reviewer fields |
| services/web/server/tests/unit/with_dbs/03/invitations/test_users_accounts_rest_registration.py | Updates tests to expect reviewer names instead of IDs and adjusts role filtering logic |
services/web/server/tests/unit/with_dbs/03/invitations/test_users_accounts_rest_registration.py
Show resolved
Hide resolved
services/web/server/src/simcore_service_webserver/security/decorators.py
Outdated
Show resolved
Hide resolved
978661d to
24f7dbc
Compare
ef8f1ab to
fa404d3
Compare
@odeimaiz SEE osparc-simcore/services/web/server/src/simcore_service_webserver/api/v0/openapi.yaml Lines 1791 to 1837 in fa404d3
|
@pcrespov I CAN SEE IT NOW, THX |
|
@mergify queue |
🟠 Waiting for conditions to match
|
|



What do these changes do?
This pull request introduces group-based permissions for product support groups.
The main changes include adding a new decorator to check permissions via both user roles and/or group membership, updating user and group service APIs to use a stricter
UserNameIDtype, and improving how pre-registered user information is retrieved.Access Control Enhancements
group_or_role_permission_requireddecorator to enable permission checks via both user roles and/or group membership, specifically supporting product support groups (PRODUCT_SUPPORT_GROUP). This allows users to access endpoints if they have the required permission either through their role or by being in a designated group. [1] [2] [3] [4]NAMED_GROUP_PERMISSIONSmapping for group-based permissions, starting with support forPRODUCT_SUPPORT_GROUP.product.details.*admin.users.readGET /products/{product_name}→ProductGetGET /admin/user-accounts→Page[UserAccountGet]GET /admin/user-accounts:search?email=glob*→UserAccountGetUser and Group Service API Refactoring
UserNameIDtype (annotated string) throughout user and group service APIs, replacing the previousIDStralias for improved validation and clarity. [1] [2] [3] [4] [5] [6] [7] [8]is_user_in_groupservice and repository functions to check group membership by user and group IDs, supporting new permission logic. [1] [2] [3] [4]Product Support Group Utilities
is_user_in_product_support_grouputility to check if a user belongs to the support group for the current product, enabling group-based permission checks for product-related endpoints. [1] [2] [3]Related issue/s
How to test
Dev-ops
None