更新时间:2023-11-19 16:03:52
您可以使用 has_role()
测试 IS _ *
吗?这些角色就像角色,但不是角色。也许这就是为什么它总是返回 false
的原因:
Are you sure you can test IS_*
using has_role()
? These act like roles but they're not roles. Maybe that's why it always returns false
:
似乎您***使用 is_anonymous()
和 is_authenticated()
allow_if
表达式中的自定义函数。
It seems like you should better use is_anonymous()
and is_authenticated()
custom functions in the allow_if
expression.