我使用CakePHP开发我的应用程序。现在,我正在尝试使用附件文件发送电子邮件' ics'但我收到错误'文件未找到...' 这就是我现在所做的事情:
class IsAuthenticatedOrOptions(BasePermission):
"""
The request is authenticated as a user, or an OPTIONS request.
"""
def has_permission(self, request, view):
return (
request.method == 'OPTIONS' or
request.user and
request.user.is_authenticated()
)
'DEFAULT_PERMISSION_CLASSES': (
'path.to.IsAuthenticatedOrOptions',
),