summaryrefslogtreecommitdiff
path: root/app/controllers
diff options
context:
space:
mode:
authorJames Edwards-Jones <jedwardsjones@gitlab.com>2017-04-04 03:37:22 +0100
committerJames Edwards-Jones <jedwardsjones@gitlab.com>2017-04-04 03:38:58 +0100
commit07d7d8e65905a39164b63f55eccdcea8f10f5d14 (patch)
tree4fc627e0256a787ab80f4483b3d6e2442c26a619 /app/controllers
parentf9e849c076efb3162a3d951d8aae2e7be3e574f4 (diff)
downloadgitlab-ce-07d7d8e65905a39164b63f55eccdcea8f10f5d14.tar.gz
Renamed ProtectedTag push_access_levels to create_access_levels
Diffstat (limited to 'app/controllers')
-rw-r--r--app/controllers/projects/protected_tags_controller.rb2
-rw-r--r--app/controllers/projects/settings/repository_controller.rb5
2 files changed, 3 insertions, 4 deletions
diff --git a/app/controllers/projects/protected_tags_controller.rb b/app/controllers/projects/protected_tags_controller.rb
index ff132056aa4..0e00baedbdf 100644
--- a/app/controllers/projects/protected_tags_controller.rb
+++ b/app/controllers/projects/protected_tags_controller.rb
@@ -30,6 +30,6 @@ class Projects::ProtectedTagsController < Projects::ProtectedRefsController
end
def protected_ref_params
- params.require(:protected_tag).permit(:name, push_access_levels_attributes: [:access_level, :id])
+ params.require(:protected_tag).permit(:name, create_access_levels_attributes: [:access_level, :id])
end
end
diff --git a/app/controllers/projects/settings/repository_controller.rb b/app/controllers/projects/settings/repository_controller.rb
index 9022cf8f0d8..44de8a49593 100644
--- a/app/controllers/projects/settings/repository_controller.rb
+++ b/app/controllers/projects/settings/repository_controller.rb
@@ -13,16 +13,15 @@ module Projects
def define_protected_refs
@protected_branches = @project.protected_branches.order(:name).page(params[:page])
- @protected_tags = @project.protected_tags.order(:name).page(params[:page]) #TODO duplicated pagination param?
+ @protected_tags = @project.protected_tags.order(:name).page(params[:page])
@protected_branch = @project.protected_branches.new
@protected_tag = @project.protected_tags.new
load_gon_index
end
def access_levels_options
- #TODO: consider protected tags
- #TODO: Refactor ProtectedBranch::PushAccessLevel so it doesn't mention branches
{
+ create_access_levels: levels_for_dropdown(ProtectedTag::CreateAccessLevel),
push_access_levels: levels_for_dropdown(ProtectedBranch::PushAccessLevel),
merge_access_levels: levels_for_dropdown(ProtectedBranch::MergeAccessLevel)
}