1. 04 Aug, 2016 3 commits
    • Timothy Andrew's avatar
      Migrate protected branch access levels to match constants in `Gitlab::Access` · 8e13162a
      Timothy Andrew authored
      - In the final round of review (!5081), we moved the protected branch
        access levels from Rails enums to constants from Gitlab::Access.
      
      - The migrations that moved us from the old data model (a single
        protected_branches table with developers_can_push and
        developers_can_merge flags) to the new one (separate tables for
        push_access_levels and merge_access_levels) was not updated.
      
      - These migrations still used 0 to mean "Masters" and 1 to mean
        "Developers" (matching the previous Rails enum), while Gitlab::Access
        uses 40 and 30 for these, respectively.
      
      - Once the migrations run, our data gets into a broken state.
      
      - We fix this by migrating all `0`s to `40` and all `1`s to `30`.
      
      - https://gitlab.com/gitlab-org/gitlab-ce/issues/20606#note_13561628
      
      = Caveats =
      
      - In Gitlab::Access, 0 represents NO_ACCESS. When we run this migration,
        all protected branches with "No one" as an access level will be
        changed to "Masters"
      8e13162a
    • Robert Speicher's avatar
      Merge branch 'fix-project-destroy-skip-repo' into 'master' · 532202a5
      Robert Speicher authored
      Fix skip_repo parameter being ignored when destroying a namespace
      
      When destroying a namespace, the `skip_repo` parameter is supposed to prevent the repository directory from being destroyed and allow
      the namespace after_destroy hook to run. If the namespace fails to be deleted for some reason, we could be left with repositories that are deleted with existing projects.
      
      See merge request !5654
      532202a5
    • Stan Hu's avatar
      Fix skip_repo parameter being ignored when destroying a namespace · 443ae8c4
      Stan Hu authored
      When destroying a namespace, the `skip_repo` parameter is supposed
      to prevent the repository directory from being destroyed and allow
      the namespace after_destroy hook to run. If the namespace fails
      to be deleted for some reason, we could be left with repositories
      that are deleted with existing projects.
      443ae8c4
  2. 03 Aug, 2016 21 commits
  3. 02 Aug, 2016 16 commits