-
Notifications
You must be signed in to change notification settings - Fork 32
🎨 Allows guest users to run a project form a template with outputs pushing enabled #8555
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
base: master
Are you sure you want to change the base?
🎨 Allows guest users to run a project form a template with outputs pushing enabled #8555
Conversation
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 introduces functionality to allow guest users to save service states and push data to output ports when running projects from templates that have this option enabled. The implementation adds a new database table to track this optional project setting and propagates it from templates to instances.
Key Changes:
- Added a new
projects_optionalsdatabase table to store per-project optional settings - Implemented logic to check and enable state/output port pushing for guest users when the project allows it
- Ensured template projects propagate their guest permissions to newly created project instances
Reviewed Changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
packages/postgres-database/src/simcore_postgres_database/models/projects_optionals.py |
Defines the new projects_optionals table schema with a boolean flag for guest permissions |
packages/postgres-database/src/simcore_postgres_database/migration/versions/a85557c02d71_add_projects_optionals.py |
Database migration to create the projects_optionals table |
packages/postgres-database/src/simcore_postgres_database/utils_projects_optionals.py |
Repository class providing methods to check and set guest permissions for projects |
services/web/server/src/simcore_service_webserver/studies_dispatcher/_studies_access.py |
Copies guest permission settings from template to new project instance |
services/web/server/src/simcore_service_webserver/projects/_projects_service.py |
Enables state saving for guest users when project permissions allow |
services/web/server/src/simcore_service_webserver/garbage_collector/_core_orphans.py |
Enables state saving during service removal for guest users when permitted |
packages/postgres-database/tests/test_utils_projects_optionals.py |
Test coverage for the new repository methods |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
services/web/server/src/simcore_service_webserver/studies_dispatcher/_studies_access.py
Outdated
Show resolved
Hide resolved
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## master #8555 +/- ##
==========================================
+ Coverage 87.55% 87.92% +0.36%
==========================================
Files 2011 1605 -406
Lines 78761 64259 -14502
Branches 1368 569 -799
==========================================
- Hits 68958 56497 -12461
+ Misses 9399 7611 -1788
+ Partials 404 151 -253
Continue to review full report in Codecov by Sentry.
🚀 New features to boost your workflow:
|
…e-can-save-templates
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
Copilot reviewed 7 out of 7 changed files in this pull request and generated no new comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
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.
not sure I understand why states have to be uploaded here. outputs ok, but why the states?
Please change the db table name to something more precise. thanks!
| from .projects import projects | ||
|
|
||
| projects_optionals = sa.Table( | ||
| "projects_optionals", |
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.
I find this name very weird and very unclear. That could mean anything.
Also I wonder what is the point of pushing the states here? a guest user is only temporary, what is the point of saving the states?
The outputs I understand as this can be used in subsequent nodes, but the states?
|
|
||
| @classmethod | ||
| async def allows_guests_to_push_states_and_output_ports( | ||
| cls, async_engine: AsyncEngine, *, project_uuid: str |
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.
so this is like a separate call to a separate database everytime one asks for the projects? can this not be made together with a join in one call?
at this point, if that is really needed, the table should be named something like projects_guest_properties maybe
| class CouldNotCreateOrUpdateUserPreferenceError(Exception): ... | ||
|
|
||
|
|
||
| class BaseProjectOptionalsRepo: |
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.
Base?



What do these changes do?
For a given published project add an entry inside
projects_optionalswithallow_guests_to_push_states_and_output_ports=Trueto allow GUEST users to save the outputs and the states of all new style dynamic services in that project.Related issue/s
How to test
Dev-ops