Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTimothy Andrew <mail@timothyandrew.net>2016-07-07 10:36:28 +0300
committerTimothy Andrew <mail@timothyandrew.net>2016-07-29 12:50:39 +0300
commit134fe5af83167f95205a080f7932452de7d77496 (patch)
tree6f253ad95afc8fc0525c6501ce9345294dd1ff45 /app/models/protected_branch/push_access_level.rb
parent21bece443d5f871680a3d7649c2d16861035196d (diff)
Use the `{Push,Merge}AccessLevel` models in the UI.
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`
Diffstat (limited to 'app/models/protected_branch/push_access_level.rb')
-rw-r--r--app/models/protected_branch/push_access_level.rb2
1 files changed, 2 insertions, 0 deletions
diff --git a/app/models/protected_branch/push_access_level.rb b/app/models/protected_branch/push_access_level.rb
index d53c4c391e3..4345dc4ede4 100644
--- a/app/models/protected_branch/push_access_level.rb
+++ b/app/models/protected_branch/push_access_level.rb
@@ -1,3 +1,5 @@
class ProtectedBranch::PushAccessLevel < ActiveRecord::Base
belongs_to :protected_branch
+
+ enum access_level: [:masters, :developers]
end