Commit d548d819 authored by Lin Jen-Shin's avatar Lin Jen-Shin

Fix how we use EE::ProtectedRefAccess

This is a mess... Using prepend will give a different ancestors
chain we're not expecting. To fix this we'll need to know what
exactly methods we want to use in each classes using this module.
parent 07da8f91
......@@ -2,18 +2,17 @@
module ProtectedBranchAccess
extend ActiveSupport::Concern
include ProtectedRefAccess
included do
include ProtectedRefAccess
belongs_to :protected_branch
delegate :project, to: :protected_branch
end
def check_access(user)
return false if access_level == Gitlab::Access::NO_ACCESS
def check_access(user)
return false if access_level == Gitlab::Access::NO_ACCESS
super
end
super
end
end
......@@ -2,10 +2,9 @@
module ProtectedTagAccess
extend ActiveSupport::Concern
include ProtectedRefAccess
included do
include ProtectedRefAccess
belongs_to :protected_tag
delegate :project, to: :protected_tag
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment