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.
This commit is contained in:
parent
07da8f9128
commit
d548d81990
2 changed files with 6 additions and 8 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue