From 48717b434d583a0be1f22803edd6948c13e11591 Mon Sep 17 00:00:00 2001 From: James Edwards-Jones Date: Sun, 25 Mar 2018 03:45:43 +0100 Subject: Revert exploratory branch restriction policy --- app/policies/protected_branch_policy.rb | 10 ---------- 1 file changed, 10 deletions(-) (limited to 'app/policies') diff --git a/app/policies/protected_branch_policy.rb b/app/policies/protected_branch_policy.rb index 29dd897194d..1a7faa4db40 100644 --- a/app/policies/protected_branch_policy.rb +++ b/app/policies/protected_branch_policy.rb @@ -1,19 +1,9 @@ class ProtectedBranchPolicy < BasePolicy delegate { @subject.project } - condition(:requires_admin_to_unprotect?, scope: :subject) do - @subject.name == 'master' && Gitlab::CurrentSettings.only_admins_can_unprotect_master_branch? - end - rule { can?(:admin_project) }.policy do enable :create_protected_branch enable :update_protected_branch enable :destroy_protected_branch end - - rule { requires_admin_to_unprotect? & ~admin }.policy do - prevent :create_protected_branch - prevent :update_protected_branch - prevent :destroy_protected_branch - end end -- cgit v1.2.1