浏览代码
Merge pull request #72 from ChlodAlejandro/main
Only enforce login on action=search
pull/73/head
Ben Kurtovic
3 周前
committed by
GitHub
找不到此签名对应的密钥
GPG 密钥 ID: B5690EEEBB952194
共有
1 个文件被更改,包括
2 次插入 和
1 次删除
-
src/copyvios/checker.py
|
|
|
@@ -56,7 +56,8 @@ def do_check(query: CheckQuery) -> CopyvioCheckResult | None: |
|
|
|
is_logged_in = _get_username() is not None |
|
|
|
config_bypass = current_app.config.get("COPYVIOS_BYPASS_LOGIN", False) |
|
|
|
if ( |
|
|
|
query.use_engine |
|
|
|
query.action == "search" |
|
|
|
and query.use_engine |
|
|
|
and not is_logged_in |
|
|
|
and not isinstance(query, APIQuery) |
|
|
|
and not config_bypass |
|
|
|
|