Skip to content

File Locking

File locking is a collaboration feature that prevents multiple users from editing the same file simultaneously in multi-user projects. This ensures data integrity and prevents accidental overwrites when multiple team members are working on the same project.

Overview

When multiple users are assigned to a project, file locking becomes active to coordinate file access. In single-user projects, the locking mechanism is disable and doesn't affect the user experience.

File lock icon
Datamimic File Locking

How It Works

When multiple users work on the same project, you must unlock a file before editing it. Other users will see the file is locked and cannot edit it until you unlock it.

File locked notification
Showing locked notification

Unlocking a File

  1. Click the lock button (πŸ”’) next to the file you want to edit
  2. The file becomes editable and lock button became open lock
  3. Other users see the file is locked
File locked notification
User unlock a file

Locking a File

  1. You need to save before lock otherwise your change maybe reverse
  2. Click the open lock button when you're finished editing
  3. The file becomes lock (πŸ”’)
File locked notification
Other user unlock a file

What Happens When a File is Locked

For Other Users

  • File opens in read-only mode - you can view but not edit
  • Lock owner's name is displayed when hover to πŸ”’ icon
  • Rename/delete options are disabled
Context menu with disabled actions
Rename/delete options were disabled

For You (Lock Owner)

  • File is fully editable - you can make changes normally
  • All operations are available (rename, delete, edit)

Taking Over a Lock

If you need to edit a file that's locked by someone else:

  1. Click the lock button
  2. A warning dialog appears explaining the consequences
  3. Click "Take over" to steal the lock
  4. The previous user's unsaved changes will be lost
Lock takeover confirmation dialog
Confirmation dialog warning about lock takeover and data loss

⚠️ Important: Lock stealing will permanently delete any unsaved changes made by the previous user.

Notifications

You'll receive notifications when: - Successfully locking/unlocking a file - Someone takes over your lock

Best Practices

For Smooth Collaboration

  • Lock files only when you need to edit
  • Save before lock a file
  • Unlock files promptly when finished
  • Communicate with teammates before stealing locks

When to Steal a Lock

  • Only when necessary and after checking with the lock owner
  • When the lock owner is unavailable and you need urgent access
  • After confirming the other user's work won't be lost

Troubleshooting

File Won't Unlock

  • Check your internet connection - locks require WebSocket connection
  • Wait for automatic timeout - locks expire after 5 minutes
  • Refresh the page if the lock status seems stuck

Can't Edit a File

  • Check if the file is locked by another user
  • Look for the lock icon (πŸ”’) in the file tree
  • Try unlocking the file first before editing
  • Contact the lock owner if you need access