{"record":{"id":"4683beb147e40c0d","repo":"invoke-ai/InvokeAI","slug":"queue-user-is-not-authorized-to-save-videos-to-thi","errorCode":null,"errorMessage":"Queue user is not authorized to save videos to this board","messagePattern":"Queue user is not authorized to save videos to this board","errorType":"exception","errorClass":"PermissionError","httpStatus":null,"severity":"error","filePath":"invokeai/app/services/shared/invocation_context.py","lineNumber":412,"sourceCode":"        board_id_ = None\n        if board_id:\n            board_id_ = board_id\n        elif isinstance(self._data.invocation, WithBoard) and self._data.invocation.board:\n            board_id_ = self._data.invocation.board.board_id\n\n        if self._services.configuration.multiuser:\n            user = self._services.users.get(self._data.queue_item.user_id)\n            # See ImagesInterface.save: deactivated accounts must not save outputs.\n            if user is None or not user.is_active:\n                raise PermissionError(\"Queue user is not authorized to save videos\")\n            if board_id_ is not None:\n                board = self._services.boards.get_dto(board_id_)\n                if (\n                    not user.is_admin\n                    and board.user_id != self._data.queue_item.user_id\n                    and board.board_visibility != BoardVisibility.Public\n                ):\n                    raise PermissionError(\"Queue user is not authorized to save videos to this board\")\n\n        workflow_ = None\n        if self._data.queue_item.workflow:\n            workflow_ = self._data.queue_item.workflow.model_dump_json()\n\n        graph_ = None\n        if self._data.queue_item.session.graph:\n            graph_ = self._data.queue_item.session.graph.model_dump_json()\n\n        return self._services.videos.create(\n            source_path=source_path,\n            width=width,\n            height=height,\n            duration=duration,\n            fps=fps,\n            is_intermediate=self._data.invocation.is_intermediate,\n            video_category=image_category,\n            board_id=board_id_,","sourceCodeStart":394,"sourceCodeEnd":430,"githubUrl":"https://github.com/invoke-ai/InvokeAI/blob/0b6a024f2ff6a86bfb953dcdb9cc504ef7397a06/invokeai/app/services/shared/invocation_context.py#L394-L430","documentation":"Raised in ModelsContext.save when an image/video is being saved to a board that the queue user is not permitted to write to. InvokeAI allows a save only if the queue user is an admin, owns the board (board.user_id equals the queue item's user_id), or the board is Public. Otherwise a PermissionError is thrown to prevent cross-user writes to shared boards.","triggerScenarios":"Calling ctx.models.save (image/video save path) with board_id_ pointing to a board owned by a different user whose board_visibility is not Public, while the queue user is not an admin.","commonSituations":"Multi-user InvokeAI deployments where a workflow hardcodes another user's board ID; boards created Private/Shared by one user but referenced by another user's queue item; admin changed board visibility after a workflow was authored.","solutions":["Set the board's visibility to Public so any queue user can save to it","Have the queue item run under the same user that owns the board","Ask an admin user to run the workflow (admins bypass the check)","Use a board owned by the queue user instead of the hardcoded board_id"],"exampleFix":"// before\nctx.images.save(board_id=\"board-owned-by-alice\")\n// after\nboard = ctx._services.boards.get_dto(\"board-owned-by-alice\")\nassert board.board_visibility == BoardVisibility.Public or board.user_id == queue_item.user_id\nctx.images.save(board_id=\"board-owned-by-alice\")","handlingStrategy":"validation","validationCode":"board = services.boards.get_dto(board_id)\nqueue_user_is_admin = user.is_admin\nowns_board = board.user_id == queue_item.user_id\nif not (queue_user_is_admin or owns_board or board.board_visibility == BoardVisibility.Public):\n    raise PermissionError(f\"cannot save to board {board.board_id}\")\nctx.images.save(image_name=image_name, board_id=board_id)","typeGuard":"def can_save_to_board(user, board, queue_item) -> bool:\n    return user.is_admin or board.user_id == queue_item.user_id or board.board_visibility == BoardVisibility.Public","tryCatchPattern":null,"preventionTips":["Prefer Public boards for shared/cross-user workflows","Run shared workflows under the board owner's account or an admin","Verify board ownership/visibility before saving"],"tags":["permissions","boards","multi-user"],"backgroundTag":"permission-denied","analyzedSha":"0b6a024f2ff6a86bfb953dcdb9cc504ef7397a06","analyzedAt":"2026-08-29T04:46:49.967Z","schemaVersion":2},"datasetVersion":"2026-08-29T07:17:48.351Z"}