Commit c490430f authored by Marin Jankovski's avatar Marin Jankovski

Fix leftover user checks for git_annex after refactoring

parent 18cbfd82
...@@ -68,9 +68,7 @@ module Gitlab ...@@ -68,9 +68,7 @@ module Gitlab
when *PUSH_COMMANDS when *PUSH_COMMANDS
push_access_check(changes) push_access_check(changes)
when *GIT_ANNEX_COMMANDS when *GIT_ANNEX_COMMANDS
if actor.is_a? Key git_annex_access_check(project, changes)
git_annex_access_check(actor.user, project, changes)
end
else else
build_status_object(false, "The command you're trying to execute is not allowed.") build_status_object(false, "The command you're trying to execute is not allowed.")
end end
...@@ -283,8 +281,8 @@ module Gitlab ...@@ -283,8 +281,8 @@ module Gitlab
GitAccessStatus.new(status, message) GitAccessStatus.new(status, message)
end end
def git_annex_access_check(user, project, changes) def git_annex_access_check(project, changes)
unless user && user_allowed?(user) unless user && user_allowed?
return build_status_object(false, "You don't have access") return build_status_object(false, "You don't have access")
end end
......
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