Commit 78faeab8 authored by Stan Hu's avatar Stan Hu

Fix regression in Git Annex permission check

The `changes` in git-annex-shell mean a different thing than
git-receive-pack. Revert to the previous code and use a simple check
whether Git Annex is enabled.
parent 5fc31b1d
......@@ -4,6 +4,7 @@ v 8.11.0 (unreleased)
- Performance improvement of push rules
v 8.10.3 (unreleased)
- Fix regression in Git Annex permission check
v 8.10.2
- Fix pagination on search result page when ES search is enabled. !592
......
......@@ -253,6 +253,8 @@ module Gitlab
end
def git_annex_access_check(project, changes)
return false unless Gitlab.config.gitlab_shell.git_annex_enabled
unless user && user_access.allowed?
return build_status_object(false, "You don't have access")
end
......@@ -265,7 +267,7 @@ module Gitlab
return build_status_object(false, "You can't use git-annex with a secondary GitLab Geo node.")
end
if user.can?(:push_code, project) && git_annex_branch_sync?(changes)
if user.can?(:push_code, project)
build_status_object(true)
else
build_status_object(false, "You don't have permission")
......
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