Skip to content

File Lock

Valery Sizov requested to merge file_locks into master

Fixes https://gitlab.com/gitlab-org/gitlab-ee/issues/497

  • Data layer(tables, models, migrations)
  • Checks on git push
  • Author should be able to push if one owns the lock
  • Path matcher with tokenizer and memoization
  • Show lock status icons by files and folders
  • UI: mockup buttons for locking files, folders
  • UI: Locking files
  • UI: Locking folders
  • Permissions check everywhere
  • Add page to list all locked files/dirs to get overview in case people forget to unlock
  • Refactor lock_file_button and lock_file_link
  • Testing Git LFS
  • Get rid of code duplication in pre-receive hook
  • Test case: I want to unlock file if I'm a developer and I'm not an author of lock
  • Make it EE option
  • Specs and spinach
  • TODOs in the code

Can be moved to the next iteration:

  • Fix Web UI lock check(!487 (merged))
  • timeago in the lock icon tooltip. It's not working out of the box(#704)
  • Ajax load bar on click "Lock/Unlock" in the file tree (#698 (closed))
  • Nested locking UI. If we look at file and it's locked because of parent we should show it in tooltip. (#705 (closed))

Screenshots

joxi_screenshot_1466188707474joxi_screenshot_1466188735083joxi_screenshot_1466188758950

Related info: Douwe wrote: For a next iteration, we need to think about nested locking more. If user A has locked lib/, user B shouldn't be able to lock lib/foo.rb since that falls under lib/. Similarly, if user A has locked lib/foo.rb, user B shouldn't be able to lock lib/, because part of that directory is locked by someone else already.

Merge request reports