1. 02 8月, 2016 1 次提交
  2. 29 7月, 2016 2 次提交
    • T
      Use `Gitlab::Access` to protected branch access levels. · 0a8aeb46
      Timothy Andrew 提交于
      1. It makes sense to reuse these constants since we had them duplicated
         in the previous enum implementation. This also simplifies our
         `check_access` implementation, because we can use
         `project.team.max_member_access` directly.
      
      2. Use `accepts_nested_attributes_for` to create push/merge access
         levels. This was a bit fiddly to set up, but this simplifies our code
         by quite a large amount. We can even get rid of
         `ProtectedBranches::BaseService`.
      
      3. Move API handling back into the API (previously in
         `ProtectedBranches::BaseService#translate_api_params`.
      
      4. The protected branch services now return a `ProtectedBranch` rather
         than `true/false`.
      
      5. Run `load_protected_branches` on-demand in the `create` action, to
         prevent it being called unneccessarily.
      
      6. "Masters" is pre-selected as the default option for "Allowed to Push"
         and "Allowed to Merge".
      
      7. These changes were based on a review from @rymai in !5081.
      0a8aeb46
    • T
      Add a series of migrations changing the model-level design of protected branch access levels. · f1e46d1e
      Timothy Andrew 提交于
      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]
      f1e46d1e
  3. 27 7月, 2016 1 次提交
  4. 21 7月, 2016 1 次提交
  5. 20 7月, 2016 4 次提交
  6. 19 7月, 2016 3 次提交
  7. 18 7月, 2016 2 次提交
  8. 17 7月, 2016 1 次提交
  9. 15 7月, 2016 2 次提交
  10. 14 7月, 2016 2 次提交
  11. 13 7月, 2016 4 次提交
  12. 08 7月, 2016 1 次提交
    • D
      Added setting to set new users by default as external · a0a9494e
      Dravere 提交于
      As requested by the issue #14508 this adds an option in the application
      settings to set newly registered users by default as external. The
      default setting is set to false to stay backward compatible.
      a0a9494e
  13. 07 7月, 2016 1 次提交
  14. 06 7月, 2016 3 次提交
  15. 05 7月, 2016 1 次提交
  16. 30 6月, 2016 2 次提交
  17. 28 6月, 2016 1 次提交
  18. 20 6月, 2016 3 次提交
  19. 16 6月, 2016 3 次提交
  20. 15 6月, 2016 2 次提交