Skip to content

Conversation

@louispt1
Copy link
Contributor

@louispt1 louispt1 commented Dec 29, 2025

Description

Implements a pass-through API that proxies SavedScenario user management requests to MyETM.
These changes, along with this Myetm PR allow users to manage roles on SavedScenarios via the Engine, and solidify the user coupling functionality so accounts are properly coupled based on the callback actions in MyETM.

Key changes:

  • SavedScenarioUsersController with full CRUD endpoints for bulk user operations (/api/v3/saved_scenarios/:id/users)
  • Scenario#copy_roles_from_saved_scenario to replicate user permissions when creating scenarios from presets
  • ETEngine::MyETM module for a pre-configured Faraday client (mimicking setup in MyETM --> We can re-use the my_etm_client for other similar Faraday calls)
  • Test coverage for the changes

Still to do

  • Document SavedScenarioUsers CRUD endpoints

Relevant for this pyetm PR

Closes #1687

@louispt1 louispt1 force-pushed the saved-scenario-users branch from ded041a to 2e950cc Compare December 29, 2025 14:12
@louispt1 louispt1 force-pushed the saved-scenario-users branch 2 times, most recently from 29cf8e2 to ec68d83 Compare December 30, 2025 13:29
@louispt1 louispt1 marked this pull request as draft December 30, 2025 13:36
@louispt1 louispt1 force-pushed the saved-scenario-users branch from ec68d83 to a180647 Compare December 30, 2025 14:08
Copy link
Member

@noracato noracato left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Adding all CRUD operations is a great idea.

Let's get a clear grip on who does what, and who holds the truth in the end. Like you said for SavedScenarios it should be myETM who's in control. Maybe we can draft a diagram about interactions and which app has which initiative.

@louispt1 louispt1 marked this pull request as ready for review January 8, 2026 15:50
@louispt1 louispt1 force-pushed the saved-scenario-users branch from 6b8ee56 to dcaf97b Compare January 8, 2026 15:50
Copy link
Member

@noracato noracato left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cool stuff! I had just one small doubt about the preset user data. Could you explain your thought process there?

@louispt1 louispt1 force-pushed the saved-scenario-users branch from dcaf97b to fcf7447 Compare January 9, 2026 13:52
@louispt1 louispt1 force-pushed the saved-scenario-users branch from fcf7447 to 861c20d Compare January 9, 2026 13:53
@louispt1 louispt1 merged commit f1c620c into master Jan 9, 2026
1 check passed
@louispt1 louispt1 deleted the saved-scenario-users branch January 9, 2026 15:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Saved Scenario User Passthrough to myetm

3 participants