feat: pessimistic check-out locking for CAD files #87
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Ref: docs/ROADMAP.md § Multi-User Enablement
Implement pessimistic (exclusive) locking so two users cannot simultaneously edit the same part file.
Requirements
Database
lockstable:id,item_id(FK unique),locked_by(user ID),locked_at,expires_at,commentAPI Endpoints
POST /api/items/{partNumber}/lock— acquire lock (editor+)DELETE /api/items/{partNumber}/lock— release lock (owner or admin)GET /api/items/{partNumber}/lock— check lock status (viewer+)GET /api/locks— list all active locks (viewer+)Behavior
PUT /api/items/{partNumber},POST .../file,POST .../revisions) should reject with 409 Conflict if item is locked by a different useritem.locked/item.unlockedemitted on state changesWeb UI
FreeCAD Integration
silo checkoutCLI command should acquire locksilo commitshould release lock on successful uploadsilo lock/silo unlockexplicit commands