Skip to content
Snippets Groups Projects

Disallow non-members to unlock project files

All threads resolved!

What does this MR do and why?

This MR fixes #276067 (closed)

Please note that is was decided that it can be fixed in the canonical repo

This MR fixes the behavior when User removed from the project is still able to unlock a file, that they locked previously while they were a member of that project. It was possible by going to Repository >> Locked Files in the Project ( https://gitlab.com/[group]/[project]/path_locks). Now non-members are not able to unlock project files anymore.

How to set up and validate locally

  1. Create a public Test Project with a Test File
  2. Invite a UserA with Developer permissions
  3. The User locks the Test File
  4. As Owner of the Test Project, remove the UserA from your project
  5. At this point UserA can't unlock the Test File anymore because they are not a member anymore, neither by going to Repository >> Files >> Test File nor by trying with Repository >> Locked Files in the Test Project ( https://gitlab.com/[group]/[project]/path_locks)

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Edited by Magdalena Frankiewicz

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • Zamir Martins approved this merge request

    approved this merge request

  • Zamir Martins requested review from @smcgivern

    requested review from @smcgivern

  • :wave: @zmartins, thanks for approving this merge request.

    This is the first time the merge request is approved. To ensure full test coverage, a new pipeline has been started.

    For more info, please refer to the following links:

  • Zamir Martins removed review request for @zmartins

    removed review request for @zmartins

  • mentioned in commit 86dd86eb

  • added 1 commit

    • 86dd86eb - Disallow non-members unlocking project files

    Compare with previous version

  • Sean McGivern removed review request for @smcgivern

    removed review request for @smcgivern

  • added 1 commit

    • 386d12c7 - Use permission system for path_locks

    Compare with previous version

  • requested review from @smcgivern

  • Sean McGivern removed review request for @smcgivern

    removed review request for @smcgivern

  • added 1 commit

    • 43d9e116 - Use permission system for path_locks

    Compare with previous version

  • mentioned in commit 66d4ccd5

  • added 2436 commits

    Compare with previous version

  • mentioned in commit fd76d685

  • added 32 commits

    Compare with previous version

  • Sean McGivern resolved all threads

    resolved all threads

  • Sean McGivern approved this merge request

    approved this merge request

  • Sean McGivern enabled an automatic merge when the pipeline for 0da95429 succeeds

    enabled an automatic merge when the pipeline for 0da95429 succeeds

  • Magdalena Frankiewicz resolved all threads

    resolved all threads

  • merged

  • Sean McGivern mentioned in commit 2498f1e3

    mentioned in commit 2498f1e3

  • added workflowcanary label and removed workflowstaging label

  • added workflowproduction label and removed workflowcanary label

  • Congratulations :tada: @m_frankiewicz, your Issue/Merge Request has been awarded! (Learn more about the Security Awards Program)

  • Please register or sign in to reply
    Loading