Skip to content
Snippets Groups Projects
Commit b633bfdb authored by Douwe Maan's avatar Douwe Maan Committed by Marin Jankovski
Browse files

Merge branch 'git_annex_fix' into 'master'

Fix leftover user checks for git_annex after refactoring

Fixes #291

See merge request !404
parent 752b11e1
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -68,9 +68,7 @@ def check(cmd, changes = nil)
when *PUSH_COMMANDS
push_access_check(changes)
when *GIT_ANNEX_COMMANDS
if actor.is_a? Key
git_annex_access_check(actor.user, project, changes)
end
git_annex_access_check(project, changes)
else
build_status_object(false, "The command you're trying to execute is not allowed.")
end
Loading
Loading
@@ -283,8 +281,8 @@ def build_status_object(status, message = '')
GitAccessStatus.new(status, message)
end
 
def git_annex_access_check(user, project, changes)
unless user && user_allowed?(user)
def git_annex_access_check(project, changes)
unless user && user_allowed?
return build_status_object(false, "You don't have access")
end
 
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment