fix(boards): enforce ownership on update/delete endpoints in multiuser mode#79
Closed
Copilot wants to merge 255 commits intocopilot/set-up-copilot-instructionsfrom
Closed
fix(boards): enforce ownership on update/delete endpoints in multiuser mode#79Copilot wants to merge 255 commits intocopilot/set-up-copilot-instructionsfrom
Copilot wants to merge 255 commits intocopilot/set-up-copilot-instructionsfrom
Conversation
- Add explicit storage_device parameter (cpu) - Add explicit log_memory_usage parameter from config - Improves code clarity and configuration transparency Co-authored-by: lstein <111189+lstein@users.noreply.github.com>
- Remove all trailing whitespace (W293 errors) - Add debug logging when timeout fires but activity detected - Add debug logging when timeout fires but cache is empty - Only log "Clearing model cache" message when actually clearing - Prevents misleading timeout messages during active generation Co-authored-by: lstein <111189+lstein@users.noreply.github.com>
Only log "Clearing model cache" message when there are actually unlocked models to clear. This prevents the misleading message from appearing during active generation when all models are locked. Changes: - Check for unlocked models before logging clear message - Add count of unlocked models in log message - Add debug log when all models are locked - Improves user experience by avoiding confusing messages Co-authored-by: lstein <111189+lstein@users.noreply.github.com>
Configure mock logger to return a valid log level for getEffectiveLevel() to prevent TypeError when comparing with logging.DEBUG constant. The issue was that ModelCache._log_cache_state() checks self._logger.getEffectiveLevel() > logging.DEBUG, and when the logger is a MagicMock without configuration, getEffectiveLevel() returns another MagicMock, causing a TypeError when compared with an int. Fixes all 4 test failures in test_model_cache_timeout.py Co-authored-by: lstein <111189+lstein@users.noreply.github.com>
…model-option' into copilot/add-unload-model-option
Add support for alternative diffusers Flow Matching schedulers: - Euler (default, 1st order) - Heun (2nd order, better quality, 2x slower) - LCM (optimized for few steps) Backend: - Add schedulers.py with scheduler type definitions and class mapping - Modify denoise.py to accept optional scheduler parameter - Add scheduler InputField to flux_denoise invocation (v4.2.0) Frontend: - Add fluxScheduler to Redux state and paramsSlice - Create ParamFluxScheduler component for Linear UI - Add scheduler to buildFLUXGraph for generation
Add support for alternative diffusers Flow Matching schedulers for Z-Image: - Euler (default) - 1st order, optimized for Z-Image-Turbo (8 steps) - Heun (2nd order) - Better quality, 2x slower - LCM - Optimized for few-step generation Backend: - Extend schedulers.py with Z-Image scheduler types and mapping - Add scheduler InputField to z_image_denoise invocation (v1.3.0) - Refactor denoising loop to support diffusers schedulers Frontend: - Add zImageScheduler to Redux state in paramsSlice - Create ParamZImageScheduler component for Linear UI - Add scheduler to buildZImageGraph for generation
Changed the default value of model_cache_keep_alive from 0 (indefinite) to 5 minutes as requested. This means models will now be automatically cleared from cache after 5 minutes of inactivity by default, unless users explicitly configure a different value. Users can still set it to 0 in their config to get the old behavior of keeping models indefinitely. Co-authored-by: lstein <111189+lstein@users.noreply.github.com>
LCM scheduler may have more internal timesteps than user-facing steps, causing user_step to exceed total_steps. This resulted in progress percentage > 1.0, which caused a pydantic validation error. Fix: Only call step_callback when user_step <= total_steps.
…/Pfannkuchensack/InvokeAI into feature/zimage-scheduler-support
…ai#8876) Co-authored-by: Lincoln Stein <lincoln.stein@gmail.com>
* Initial plan * Fix canvas text tool breaking hotkeys when canvas manager is null Co-authored-by: lstein <111189+lstein@users.noreply.github.com> * chore(frontend): fix eslint issue --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: lstein <111189+lstein@users.noreply.github.com> Co-authored-by: Lincoln Stein <lincoln.stein@gmail.com>
…#61) * Initial plan * Fix: strip image preview from InvocationProgressEvent sent to admin room Co-authored-by: lstein <111189+lstein@users.noreply.github.com> * chore: ruff * fix(backend): add migration_29 file * chore(tests): fix migration_29 test --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: lstein <111189+lstein@users.noreply.github.com> Co-authored-by: Lincoln Stein <lincoln.stein@gmail.com>
…for non-admin users (#63) * Initial plan * fix(queue): System user queue items show blank instead of `<hidden>` for non-admin users Co-authored-by: lstein <111189+lstein@users.noreply.github.com> * chore(backend): ruff --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: lstein <111189+lstein@users.noreply.github.com> Co-authored-by: Lincoln Stein <lincoln.stein@gmail.com>
…user mode (#65) * Initial plan * Hide use cache checkbox for non-admin users in multiuser mode Co-authored-by: lstein <111189+lstein@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: lstein <111189+lstein@users.noreply.github.com>
* Initial plan * Fix node loading hang when URL ends with /app Co-authored-by: lstein <111189+lstein@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: lstein <111189+lstein@users.noreply.github.com>
…nts (#69) * Initial plan * Add user management module with invoke-useradd/userdel/userlist/usermod entry points Co-authored-by: lstein <111189+lstein@users.noreply.github.com> * chore(util): remove superceded user administration scripts --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: lstein <111189+lstein@users.noreply.github.com> Co-authored-by: Lincoln Stein <lincoln.stein@gmail.com>
* Initial plan * Fix migration 28 to handle missing data column in client_state table Co-authored-by: lstein <111189+lstein@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: lstein <111189+lstein@users.noreply.github.com>
#71) * Initial plan * Consolidate migrations 27, 28, and 29 into a single migration step Co-authored-by: lstein <111189+lstein@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: lstein <111189+lstein@users.noreply.github.com>
Remove 5th parameter for function that expects 4 parameters Co-authored-by: Lincoln Stein <lincoln.stein@gmail.com>
…ke-ai#8889) Co-authored-by: Lincoln Stein <lincoln.stein@gmail.com>
…into copilot/fix-image-board-endpoints
… tests Co-authored-by: lstein <111189+lstein@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Fix image board endpoints to respect current user in multiuser mode
fix(boards): enforce ownership on update/delete endpoints in multiuser mode
Feb 22, 2026
Owner
|
copilot royally screwed this one up. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
update_boardanddelete_boardinboards.pyaccepted theCurrentUserOrDefaultdependency but never used it — any authenticated user could modify or delete any board regardless of ownership.Fix:
Tests (
test_boards_multiuser.py):regular_user1_token/regular_user2_tokenfixtures (real non-admin users, separate from the existing admin fixture)Test infrastructure (
conftest.py):board_images=Nonewithboard_images=BoardImagesService()— the delete endpoint callsboard_images.get_all_board_image_names_for_board, which was previously unavailable in the test mockRelated Issues / Discussions
QA Instructions
Run with multiuser mode enabled. Create a board as user A, then authenticate as user B and attempt
PATCH /v1/boards/{id}andDELETE /v1/boards/{id}— both should return 403. The same requests as user A or as an admin should succeed.Merge Plan
This PR is based on
feature/multiuserand should be merged into that branch, notmain.Checklist
What's Newcopy (if doing a release after this PR)Original prompt
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.