Skip to content

Add User ID override to demo_run page#549

Merged
neoneye merged 4 commits intomainfrom
feat/demo-run-user-id-override
Apr 10, 2026
Merged

Add User ID override to demo_run page#549
neoneye merged 4 commits intomainfrom
feat/demo-run-user-id-override

Conversation

@neoneye
Copy link
Copy Markdown
Member

@neoneye neoneye commented Apr 10, 2026

Summary

  • Add User ID override text field to the demo_run page, between Submit method and Submit button
  • Leave empty to use the current user's ID (shown as placeholder)
  • Move demo_run from /demo_run to /admin/demo_run with Flask-Admin UI chrome
  • Fix /run endpoint ignoring the user_id form parameter — it was unconditionally overriding with the admin's own ID

Test plan

  • Admin can type a custom user_id and the plan is created under that user
  • Empty override falls back to admin's own ID
  • Works with both POST and GET submit methods
  • Flask-Admin navigation visible on the page
  • Non-admin users cannot access /admin/demo_run

🤖 Generated with Claude Code

neoneye and others added 4 commits April 10, 2026 15:05
Allows admins to run plans as a different user. Leave empty to
use the current user's ID. Works with both POST and GET methods.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Route moved from /demo_run to /admin/demo_run, template now extends
admin/master.html for consistent admin navigation.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
When admin provides an explicit user_id (e.g. from demo_run page),
use it instead of overriding with the admin's own ID.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@neoneye neoneye merged commit efc217b into main Apr 10, 2026
3 checks passed
@neoneye neoneye deleted the feat/demo-run-user-id-override branch April 10, 2026 13:25
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.

1 participant