diff options
author | Bob Van Landuyt <bob@vanlanduyt.co> | 2018-04-18 16:52:55 +0300 |
---|---|---|
committer | Bob Van Landuyt <bob@vanlanduyt.co> | 2018-04-24 15:06:59 +0300 |
commit | 35a49922e66ed9dc55685163126e1bee0a4e3dec (patch) | |
tree | 57f58e6616deaf38490a45f01f5d6c897364985b /app/models/concerns/protected_ref.rb | |
parent | aeed6b5a34e2c1c98a374e6c6178d84e07779531 (diff) |
Allow admins to push to empty repos
Diffstat (limited to 'app/models/concerns/protected_ref.rb')
-rw-r--r-- | app/models/concerns/protected_ref.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/app/models/concerns/protected_ref.rb b/app/models/concerns/protected_ref.rb index 454374121f3..94eef4ff7cd 100644 --- a/app/models/concerns/protected_ref.rb +++ b/app/models/concerns/protected_ref.rb @@ -31,7 +31,7 @@ module ProtectedRef end end - def protected_ref_accessible_to?(ref, user, action:, protected_refs: nil) + def protected_ref_accessible_to?(ref, user, project:, action:, protected_refs: nil) access_levels_for_ref(ref, action: action, protected_refs: protected_refs).any? do |access_level| access_level.check_access(user) end |