Open zannkukai opened 2 years ago
the https://github.com/inveniosoftware/invenio-access/blob/87dde7f6b43bda41ec2115ef4a358442d8136703/invenio_access/utils.py#L14 method could be return a value even for AnonymousUser
Check if user is an anonymous. If yes, return a flask_login.AnonymousIdentity instance.
user
flask_login.AnonymousIdentity
if not user.is_anonymous: return AnonymousIdentity()
I will be happy to contribute if you valid this feature.
Is your feature request related to a problem? Please describe.
the https://github.com/inveniosoftware/invenio-access/blob/87dde7f6b43bda41ec2115ef4a358442d8136703/invenio_access/utils.py#L14 method could be return a value even for AnonymousUser
Describe the solution you'd like
Check if
user
is an anonymous. If yes, return aflask_login.AnonymousIdentity
instance.I will be happy to contribute if you valid this feature.