1. 29 Jul, 2016 4 commits
    • Timothy Andrew's avatar
      Add seeds for protected branches. · b2d62e26
      Timothy Andrew authored
      b2d62e26
    • Timothy Andrew's avatar
      Use the `{Push,Merge}AccessLevel` models in the UI. · 362e632e
      Timothy Andrew authored
      1. Improve error handling while creating protected branches.
      
      2. Modify coffeescript code so that the "Developers can *" checkboxes
         send a '1' or '0' even when using AJAX. This lets us keep the backend
         code simpler.
      
      3. Use services for both creating and updating protected branches.
         Destruction is taken care of with `dependent: :destroy`
      362e632e
    • Timothy Andrew's avatar
      Add models for the protected branch access levels. · f66e019b
      Timothy Andrew authored
      - And hook up their associations.
      f66e019b
    • Timothy Andrew's avatar
      Add a series of migrations changing the model-level design of protected branch access levels. · c99e5147
      Timothy Andrew authored
      1. Remove the `developers_can_push` and `developers_can_merge` boolean
         columns.
      
      2. Add two new tables, `protected_branches_push_access`, and
         `protected_branches_merge_access`. Each row of these 'access' tables is
         linked to a protected branch, and uses a `access_level` column to
         figure out settings for the protected branch.
      
      3. The `access_level` column is intended to be used with rails' `enum`,
         with `:masters` at index 0 and `:developers` at index 1.
      
      4. Doing it this way has a few advantages:
      
         - Cleaner path to planned EE features where a protected branch is
           accessible only by certain users or groups.
      
         - Rails' `enum` doesn't allow a declaration like this due to the
           duplicates. This approach doesn't have this problem.
      
             enum can_be_pushed_by: [:masters, :developers]
             enum can_be_merged_by: [:masters, :developers]
      c99e5147
  2. 28 Jul, 2016 9 commits
  3. 27 Jul, 2016 27 commits