Skip to content

Commit

Permalink
create: add read permission
Browse files Browse the repository at this point in the history
  • Loading branch information
utnapischtim committed Apr 26, 2023
1 parent 058f8bb commit 6a5d316
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion invenio_alma/api.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
#
# Copyright (C) 2022 Graz University of Technology.
# Copyright (C) 2022-2023 Graz University of Technology.
#
# invenio-alma is free software; you can redistribute it and/or modify it
# under the terms of the MIT License; see LICENSE file for more details.
Expand All @@ -12,6 +12,7 @@

from flask import current_app
from flask_principal import Identity
from invenio_access.permissions import system_process
from invenio_records_marc21 import (
DuplicateRecordError,
Marc21Metadata,
Expand Down Expand Up @@ -42,6 +43,7 @@ def create_alma_record(
Normally - depending on the API_KEY - the record will be created in
the Institution Zone (IZ).
"""
identity.provides.add(system_process)
record = records_service.read_draft(identity, marc_id)
marc21_record_etree = convert_json_to_marc21xml(record.to_dict()["metadata"])

Expand Down

0 comments on commit 6a5d316

Please sign in to comment.