gitlab-org--gitlab-foss/spec/services
Timothy Andrew 0a8aeb46dc Use Gitlab::Access to protected branch access levels.
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.
2016-07-29 15:20:39 +05:30
..
auth Allow to access Container Registry for Public and Internal projects 2016-07-15 17:05:41 +02:00
ci Avoid describe-ing symbols in specs 2016-07-12 10:27:58 -05:00
groups Update tests for the current_application_settings request store changes 2016-05-27 19:05:52 -07:00
issues Refactor Issues::BulkUpdateService spec 2016-07-20 17:59:34 -06:00
members Raise a new Gitlab::Access::AccessDeniedError when permission is not enough to destroy a member 2016-06-18 06:06:34 +02:00
merge_requests Revert "Revert "Merge branch '18193-developers-can-merge' into 'master' "" 2016-07-18 10:16:56 +02:00
milestones Avoid describe-ing symbols in specs 2016-07-12 10:27:58 -05:00
notes Avoid describe-ing symbols in specs 2016-07-12 10:27:58 -05:00
projects Get rid of is_image in FileUploader 2016-07-19 18:51:09 +02:00
search Fix visibility of private project snippets for members when searching 2016-06-22 20:09:19 -03:00
create_commit_builds_service_spec.rb Make rubocop happy 2016-07-15 18:01:43 +02:00
create_deployment_service_spec.rb Fix creation of deployment on build that is retried, redeployed or rollback 2016-07-16 11:50:59 +02:00
create_release_service_spec.rb Tag service specs 2015-12-09 11:55:49 +01:00
create_snippet_service_spec.rb Fix more specs 2016-03-20 23:09:33 +01:00
create_tag_service_spec.rb Better message for git hooks and file locks 2016-07-04 15:31:49 +03:00
delete_tag_service_spec.rb Delete tags via rugged 2016-04-15 16:05:04 +02:00
delete_user_service_spec.rb Specs for the DeleteUserService 2016-03-15 22:19:51 +01:00
destroy_group_service_spec.rb Refactor repository paths handling to allow multiple git mount points 2016-06-29 22:30:31 -04:00
event_create_service_spec.rb Avoid describe-ing symbols in specs 2016-07-12 10:27:58 -05:00
git_hooks_service_spec.rb Better message for git hooks and file locks 2016-07-04 15:31:49 +03:00
git_push_service_spec.rb Use Gitlab::Access to protected branch access levels. 2016-07-29 15:20:39 +05:30
git_tag_push_service_spec.rb Expire branch/tag git data when needed. 2016-06-30 16:17:38 +02:00
notification_service_spec.rb Avoid describe-ing symbols in specs 2016-07-12 10:27:58 -05:00
repair_ldap_blocked_user_service_spec.rb Code style fixes and some code simplified 2016-01-08 16:26:04 -02:00
repository_archive_clean_up_service_spec.rb Extract helper methods to clean up RepositoryArchiveCleanUpService spec 2016-07-21 11:47:28 -03:00
search_service_spec.rb Tag service specs 2015-12-09 11:55:49 +01:00
system_hooks_service_spec.rb Merge branch 'add_username_to_user_system_hooks' of https://github.com/tbeadle/gitlabhq 2016-01-13 10:12:30 +01:00
system_note_service_spec.rb Rename MergeRequest methods that return commits or shas to be more clear and consistent 2016-07-06 18:50:58 -04:00
test_hook_service_spec.rb Avoid describe-ing symbols in specs 2016-07-12 10:27:58 -05:00
todo_service_spec.rb Merge branch 'kradydal/gitlab-ce-create-todos-when-issue-author-assigne-or-mention-himself' 2016-07-15 15:03:04 -05:00
update_release_service_spec.rb Tag service specs 2015-12-09 11:55:49 +01:00
update_snippet_service_spec.rb Fix more specs 2016-03-20 23:09:33 +01:00