Skip to content

Commit

Permalink
hotfix get_image
Browse files Browse the repository at this point in the history
  • Loading branch information
freeziyou committed Feb 27, 2024
1 parent b97aa51 commit d98bbba
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion server/routes/user.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,12 +86,14 @@ def download_and_respond():
if not referer:
# 公开仓库不校验
repo = get_repo_by_repo_id(repo_id)
if not repo:
return abort(404, "Not found repo!")
is_private = repo.extra.get("private", False)
app.logger.debug(f"is_private: {is_private}")

# 私有仓库校验,先登录
if is_private:
return abort(403)
return abort(403, "Not support private repo!")

return download_and_respond()

Expand Down

0 comments on commit d98bbba

Please sign in to comment.