e88504b Fix delete permission detection for PRs against the same repo

1 file Authored by puiterwijk 5 years ago, Committed by pingou 5 years ago,
    Fix delete permission detection for PRs against the same repo
    
    If the repository the PR is against is the same as the PR is from, "request.project_from"
    is None, and we should check "request.project" to see whether the person has permission
    to delete branches.
    
    This was causing "repo_obj" in is_repo_committer to be None.
    The reason this wasn't encountered by any admins is because is_repo_committer returns
    True with "is_admin()" before it even gets to using repo_obj.
    
    Signed-off-by: Patrick Uiterwijk <patrick@puiterwijk.org>
    
        
file modified
+6 -2