Skip to content

Commit d98ceea

Browse files
committed
fix #4768
1 parent 1ab2da7 commit d98ceea

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

app/api/endpoints/system.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,8 @@
2424
from app.core.security import verify_apitoken, verify_resource_token, verify_token
2525
from app.db.models import User
2626
from app.db.systemconfig_oper import SystemConfigOper
27-
from app.db.user_oper import get_current_active_superuser, get_current_active_superuser_async
27+
from app.db.user_oper import get_current_active_superuser, get_current_active_superuser_async, \
28+
get_current_active_user_async
2829
from app.helper.mediaserver import MediaServerHelper
2930
from app.helper.message import MessageHelper
3031
from app.helper.progress import ProgressHelper
@@ -203,7 +204,7 @@ def get_global_setting(token: str):
203204

204205

205206
@router.get("/env", summary="查询系统配置", response_model=schemas.Response)
206-
async def get_env_setting(_: User = Depends(get_current_active_superuser_async)):
207+
async def get_env_setting(_: User = Depends(get_current_active_user_async)):
207208
"""
208209
查询系统环境变量,包括当前版本号(仅管理员)
209210
"""
@@ -282,7 +283,7 @@ async def event_generator():
282283

283284
@router.get("/setting/{key}", summary="查询系统设置", response_model=schemas.Response)
284285
async def get_setting(key: str,
285-
_: User = Depends(get_current_active_superuser_async)):
286+
_: User = Depends(get_current_active_user_async)):
286287
"""
287288
查询系统设置(仅管理员)
288289
"""

0 commit comments

Comments
 (0)