*** Wartungsfenster jeden ersten Mittwoch vormittag im Monat ***

Skip to content
Snippets Groups Projects
Commit 530abbd0 authored by Moser, Maximilian's avatar Moser, Maximilian
Browse files

Add any_user to fetched user identities

parent 4c13c23a
No related branches found
No related tags found
1 merge request!2Modernization
......@@ -11,7 +11,7 @@
import json
from difflib import SequenceMatcher
from invenio_access.permissions import system_identity
from invenio_access.permissions import any_user, system_identity
from invenio_access.utils import get_identity
from invenio_accounts import current_accounts
from invenio_db import db
......@@ -100,7 +100,9 @@ def get_identity_for_user(user):
"""Get the Identity for the user specified via email or ID."""
if user is not None:
found_user = get_user_by_identifier(user)
return get_identity(found_user)
identity = get_identity(found_user)
identity.provides.add(any_user)
return identity
return system_identity
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment