Skip to content

Commit

Permalink
Merge pull request #238 from ConnectAI-E/freeziyou-022702
Browse files Browse the repository at this point in the history
hotfix get_image
  • Loading branch information
freeziyou authored Feb 28, 2024
2 parents 9dcbecd + d98bbba commit f4d2df8
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 f4d2df8

Please sign in to comment.