oarepo-runtime 1.5.83__py3-none-any.whl → 1.5.85__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- oarepo_runtime/services/components.py +18 -8
- oarepo_runtime/services/config/permissions_presets.py +4 -0
- {oarepo_runtime-1.5.83.dist-info → oarepo_runtime-1.5.85.dist-info}/METADATA +1 -1
- {oarepo_runtime-1.5.83.dist-info → oarepo_runtime-1.5.85.dist-info}/RECORD +8 -8
- {oarepo_runtime-1.5.83.dist-info → oarepo_runtime-1.5.85.dist-info}/WHEEL +1 -1
- {oarepo_runtime-1.5.83.dist-info → oarepo_runtime-1.5.85.dist-info}/LICENSE +0 -0
- {oarepo_runtime-1.5.83.dist-info → oarepo_runtime-1.5.85.dist-info}/entry_points.txt +0 -0
- {oarepo_runtime-1.5.83.dist-info → oarepo_runtime-1.5.85.dist-info}/top_level.txt +0 -0
@@ -8,7 +8,9 @@ from invenio_records import Record
|
|
8
8
|
|
9
9
|
from oarepo_runtime.services.custom_fields import CustomFieldsMixin, CustomFields, InlinedCustomFields
|
10
10
|
from oarepo_runtime.services.generators import RecordOwners
|
11
|
-
|
11
|
+
from invenio_rdm_records.services.config import RDMRecordServiceConfig
|
12
|
+
from invenio_drafts_resources.services.records.config import RecordServiceConfig as DraftsRecordServiceConfig
|
13
|
+
from invenio_records_resources.services.records.config import RecordServiceConfig as RecordsRecordServiceConfig
|
12
14
|
|
13
15
|
try:
|
14
16
|
from invenio_drafts_resources.services.records.uow import ParentRecordCommitOp
|
@@ -90,16 +92,24 @@ class CustomFieldsComponent(ServiceComponent):
|
|
90
92
|
for c in config:
|
91
93
|
record[c.name] =data.get(c.name)
|
92
94
|
|
93
|
-
def process_service_configs(
|
94
|
-
"""
|
95
|
-
Processes a list of service_config classes. If a class has a `components` attribute,
|
96
|
-
it extends the result with the values in it.
|
95
|
+
def process_service_configs(service_config):
|
97
96
|
|
98
|
-
:param service_config: List of service_config classes to process.
|
99
|
-
:return: A flattened list of processed components.
|
100
|
-
"""
|
101
97
|
processed_components = []
|
98
|
+
target_classes = {
|
99
|
+
RDMRecordServiceConfig,
|
100
|
+
DraftsRecordServiceConfig,
|
101
|
+
RecordsRecordServiceConfig,
|
102
|
+
}
|
103
|
+
|
104
|
+
for end_index, cls in enumerate(type(service_config).mro()):
|
105
|
+
if cls in target_classes:
|
106
|
+
break
|
107
|
+
|
108
|
+
# We need this because if the "build" function is present in service_config,
|
109
|
+
# there are two service_config instances in the MRO (Method Resolution Order) output.
|
110
|
+
start_index = 2 if hasattr(service_config, "build") else 1
|
102
111
|
|
112
|
+
service_configs = type(service_config).mro()[start_index:end_index + 1]
|
103
113
|
for config in service_configs:
|
104
114
|
|
105
115
|
if hasattr(config, "build"):
|
@@ -23,6 +23,7 @@ class OaiHarvesterPermissionPolicy(RecordPermissionPolicy):
|
|
23
23
|
can_read_files = [AnyUser(), SystemProcess()]
|
24
24
|
can_update_files = [SystemProcess()]
|
25
25
|
can_delete_files = [SystemProcess()]
|
26
|
+
can_manage_files = [SystemProcess()]
|
26
27
|
|
27
28
|
can_edit = [SystemProcess()]
|
28
29
|
can_new_version = [SystemProcess()]
|
@@ -59,6 +60,7 @@ class ReadOnlyPermissionPolicy(RecordPermissionPolicy):
|
|
59
60
|
can_update_files = [SystemProcess()]
|
60
61
|
can_delete_files = [SystemProcess()]
|
61
62
|
can_list_files = [SystemProcess()]
|
63
|
+
can_manage_files = [SystemProcess()]
|
62
64
|
|
63
65
|
can_edit = [SystemProcess()]
|
64
66
|
can_new_version = [SystemProcess()]
|
@@ -97,6 +99,7 @@ class EveryonePermissionPolicy(RecordPermissionPolicy):
|
|
97
99
|
can_update_files = [SystemProcess(), AnyUser()]
|
98
100
|
can_delete_files = [SystemProcess(), AnyUser()]
|
99
101
|
can_list_files = [SystemProcess(), AnyUser()]
|
102
|
+
can_manage_files = [SystemProcess(), AnyUser()]
|
100
103
|
|
101
104
|
can_edit = [SystemProcess(), AnyUser()]
|
102
105
|
can_new_version = [SystemProcess(), AnyUser()]
|
@@ -135,6 +138,7 @@ class AuthenticatedPermissionPolicy(RecordPermissionPolicy):
|
|
135
138
|
can_update_files = [SystemProcess(), AuthenticatedUser()]
|
136
139
|
can_delete_files = [SystemProcess(), AuthenticatedUser()]
|
137
140
|
can_list_files = [SystemProcess(), AuthenticatedUser()]
|
141
|
+
can_manage_files = [SystemProcess(), AuthenticatedUser()]
|
138
142
|
|
139
143
|
can_edit = [SystemProcess(), AuthenticatedUser()]
|
140
144
|
can_new_version = [SystemProcess(), AuthenticatedUser()]
|
@@ -73,13 +73,13 @@ oarepo_runtime/resources/file_resource.py,sha256=Ta3bFce7l0xwqkkOMOEu9mxbB8BbKj5
|
|
73
73
|
oarepo_runtime/resources/json_serializer.py,sha256=82_-xQEtxKaPakv8R1oBAFbGnxskF_Ve4tcfcy4PetI,963
|
74
74
|
oarepo_runtime/resources/localized_ui_json_serializer.py,sha256=3V9cJaG_e1PMXKVX_wKfBp1LmbeForwHyBNYdyha4uQ,1878
|
75
75
|
oarepo_runtime/services/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
76
|
-
oarepo_runtime/services/components.py,sha256=
|
76
|
+
oarepo_runtime/services/components.py,sha256=UuRKnJuUFrOVHBBG229i52T4XhZk1kECo-WKZhieWeI,4811
|
77
77
|
oarepo_runtime/services/generators.py,sha256=j87HitHA_w2awsz0C5IAAJ0qjg9JMtvdO3dvh6FQyfg,250
|
78
78
|
oarepo_runtime/services/results.py,sha256=Ap2mUJHl3V4BSduTrBWPuco0inQVq0QsuCbVhez48uY,5705
|
79
79
|
oarepo_runtime/services/search.py,sha256=9xGTN5Yg6eTdptQ9qjO_umbacf9ooMuHYGXWYfla4-M,6227
|
80
80
|
oarepo_runtime/services/config/__init__.py,sha256=559w4vphVAipa420OwTsxGUP-b7idoqSIX13FSJyVz0,783
|
81
81
|
oarepo_runtime/services/config/link_conditions.py,sha256=evPRd5XU76Ok4J-08bBfplbHZ019rl74FpJmO8iM5yg,3298
|
82
|
-
oarepo_runtime/services/config/permissions_presets.py,sha256=
|
82
|
+
oarepo_runtime/services/config/permissions_presets.py,sha256=YF99Vjh1fGqSEXNw7qIfcUQFvzpE54_BafqkO6wlYHk,6668
|
83
83
|
oarepo_runtime/services/config/service.py,sha256=s-dVbGkLICpsce6jgu7b5kzYFz9opWjSQFDBgbIhKio,4002
|
84
84
|
oarepo_runtime/services/custom_fields/__init__.py,sha256=_gqMcA_I3rdEZcBtCuDjO4wdVCqFML5NzaccuPx5a3o,2565
|
85
85
|
oarepo_runtime/services/custom_fields/mappings.py,sha256=Y1d0s9lG_VThkzSNlxAS94_9eOFZe9N2C1hpYDZvnvI,7457
|
@@ -135,9 +135,9 @@ tests/marshmallow_to_json/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJW
|
|
135
135
|
tests/marshmallow_to_json/test_datacite_ui_schema.py,sha256=82iLj8nW45lZOUewpWbLX3mpSkpa9lxo-vK-Qtv_1bU,48552
|
136
136
|
tests/marshmallow_to_json/test_simple_schema.py,sha256=izZN9p0v6kovtSZ6AdxBYmK_c6ZOti2_z_wPT_zXIr0,1500
|
137
137
|
tests/pkg_data/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
138
|
-
oarepo_runtime-1.5.
|
139
|
-
oarepo_runtime-1.5.
|
140
|
-
oarepo_runtime-1.5.
|
141
|
-
oarepo_runtime-1.5.
|
142
|
-
oarepo_runtime-1.5.
|
143
|
-
oarepo_runtime-1.5.
|
138
|
+
oarepo_runtime-1.5.85.dist-info/LICENSE,sha256=h2uWz0OaB3EN-J1ImdGJZzc7yvfQjvHVYdUhQ-H7ypY,1064
|
139
|
+
oarepo_runtime-1.5.85.dist-info/METADATA,sha256=xLjyEEsOykQC2jIlRcsENaEErL8ggHJWWzpXvhsiRWM,4720
|
140
|
+
oarepo_runtime-1.5.85.dist-info/WHEEL,sha256=OVMc5UfuAQiSplgO0_WdW7vXVGAt9Hdd6qtN4HotdyA,91
|
141
|
+
oarepo_runtime-1.5.85.dist-info/entry_points.txt,sha256=k7O5LZUOGsVeSpB7ulU0txBUNp1CVQG7Q7TJIVTPbzU,491
|
142
|
+
oarepo_runtime-1.5.85.dist-info/top_level.txt,sha256=bHhlkT1_RQC4IkfTQCqA3iN4KCB6cSFQlsXpQMSP-bE,21
|
143
|
+
oarepo_runtime-1.5.85.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|