We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent abe7581 commit 529f314Copy full SHA for 529f314
apps/admin/dependencies.py
@@ -9,7 +9,7 @@
9
10
11
async def admin_required(authorization: str = Header(default=None), request: Request = None):
12
- is_admin = authorization.split(' ')[-1] if authorization else '' == str(settings.admin_token)
+ is_admin = (authorization.split(' ')[-1] if authorization else '') == settings.admin_token
13
if request.url.path.startswith('/share/'):
14
if not settings.openUpload and not is_admin:
15
raise HTTPException(status_code=403, detail='本站未开启游客上传,如需上传请先登录后台')
0 commit comments