【发布时间】:2019-07-19 11:34:23
【问题描述】:
说我有以下方法
@staff_member_required
def foo(request):
return say_secret_hello(request)
def says_secret_hello(request):
#do secret stuff
return "hello
在urls.py
path("/hello", foo)
如您所见,我只向我的管理员公开了foo。从安全的角度来看,非管理员是否可以致电say_secret_hello()?
【问题讨论】:
-
管理员/非管理员无关,您只提供了其中一个视图的路径
标签: python django security python-3.7