elody 0.0.190__tar.gz → 0.0.192__tar.gz
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.
- {elody-0.0.190 → elody-0.0.192}/PKG-INFO +1 -1
- {elody-0.0.190 → elody-0.0.192}/pyproject.toml +1 -1
- {elody-0.0.190 → elody-0.0.192}/src/elody/object_configurations/base_object_configuration.py +2 -0
- {elody-0.0.190 → elody-0.0.192}/src/elody/object_configurations/elody_configuration.py +15 -12
- {elody-0.0.190 → elody-0.0.192}/src/elody/policies/authentication/multi_tenant_policy.py +3 -1
- {elody-0.0.190 → elody-0.0.192}/src/elody.egg-info/PKG-INFO +1 -1
- {elody-0.0.190 → elody-0.0.192}/LICENSE +0 -0
- {elody-0.0.190 → elody-0.0.192}/README.md +0 -0
- {elody-0.0.190 → elody-0.0.192}/setup.cfg +0 -0
- {elody-0.0.190 → elody-0.0.192}/src/__init__.py +0 -0
- {elody-0.0.190 → elody-0.0.192}/src/elody/__init__.py +0 -0
- {elody-0.0.190 → elody-0.0.192}/src/elody/client.py +0 -0
- {elody-0.0.190 → elody-0.0.192}/src/elody/csv.py +0 -0
- {elody-0.0.190 → elody-0.0.192}/src/elody/error_codes.py +0 -0
- {elody-0.0.190 → elody-0.0.192}/src/elody/exceptions.py +0 -0
- {elody-0.0.190 → elody-0.0.192}/src/elody/job.py +0 -0
- {elody-0.0.190 → elody-0.0.192}/src/elody/loader.py +0 -0
- {elody-0.0.190 → elody-0.0.192}/src/elody/migration/__init__.py +0 -0
- {elody-0.0.190 → elody-0.0.192}/src/elody/migration/base_object_migrator.py +0 -0
- {elody-0.0.190 → elody-0.0.192}/src/elody/object_configurations/__init__.py +0 -0
- {elody-0.0.190 → elody-0.0.192}/src/elody/object_configurations/job_configuration.py +0 -0
- {elody-0.0.190 → elody-0.0.192}/src/elody/policies/__init__.py +0 -0
- {elody-0.0.190 → elody-0.0.192}/src/elody/policies/authentication/__init__.py +0 -0
- {elody-0.0.190 → elody-0.0.192}/src/elody/policies/authentication/base_user_tenant_validation_policy.py +0 -0
- {elody-0.0.190 → elody-0.0.192}/src/elody/policies/authorization/__init__.py +0 -0
- {elody-0.0.190 → elody-0.0.192}/src/elody/policies/authorization/filter_generic_objects_policy.py +0 -0
- {elody-0.0.190 → elody-0.0.192}/src/elody/policies/authorization/filter_generic_objects_policy_v2.py +0 -0
- {elody-0.0.190 → elody-0.0.192}/src/elody/policies/authorization/generic_object_detail_policy.py +0 -0
- {elody-0.0.190 → elody-0.0.192}/src/elody/policies/authorization/generic_object_mediafiles_policy.py +0 -0
- {elody-0.0.190 → elody-0.0.192}/src/elody/policies/authorization/generic_object_metadata_policy.py +0 -0
- {elody-0.0.190 → elody-0.0.192}/src/elody/policies/authorization/generic_object_relations_policy.py +0 -0
- {elody-0.0.190 → elody-0.0.192}/src/elody/policies/authorization/generic_object_request_policy.py +0 -0
- {elody-0.0.190 → elody-0.0.192}/src/elody/policies/authorization/generic_object_request_policy_v2.py +0 -0
- {elody-0.0.190 → elody-0.0.192}/src/elody/policies/authorization/mediafile_derivatives_policy.py +0 -0
- {elody-0.0.190 → elody-0.0.192}/src/elody/policies/authorization/mediafile_download_policy.py +0 -0
- {elody-0.0.190 → elody-0.0.192}/src/elody/policies/authorization/multi_tenant_policy.py +0 -0
- {elody-0.0.190 → elody-0.0.192}/src/elody/policies/authorization/tenant_request_policy.py +0 -0
- {elody-0.0.190 → elody-0.0.192}/src/elody/policies/helpers.py +0 -0
- {elody-0.0.190 → elody-0.0.192}/src/elody/policies/permission_handler.py +0 -0
- {elody-0.0.190 → elody-0.0.192}/src/elody/policies/tenant_id_resolver.py +0 -0
- {elody-0.0.190 → elody-0.0.192}/src/elody/schemas.py +0 -0
- {elody-0.0.190 → elody-0.0.192}/src/elody/util.py +0 -0
- {elody-0.0.190 → elody-0.0.192}/src/elody/validator.py +0 -0
- {elody-0.0.190 → elody-0.0.192}/src/elody.egg-info/SOURCES.txt +0 -0
- {elody-0.0.190 → elody-0.0.192}/src/elody.egg-info/dependency_links.txt +0 -0
- {elody-0.0.190 → elody-0.0.192}/src/elody.egg-info/requires.txt +0 -0
- {elody-0.0.190 → elody-0.0.192}/src/elody.egg-info/top_level.txt +0 -0
- {elody-0.0.190 → elody-0.0.192}/src/tests/__init_.py +0 -0
- {elody-0.0.190 → elody-0.0.192}/src/tests/data.py +0 -0
- {elody-0.0.190 → elody-0.0.192}/src/tests/unit/__init__.py +0 -0
- {elody-0.0.190 → elody-0.0.192}/src/tests/unit/test_csv.py +0 -0
- {elody-0.0.190 → elody-0.0.192}/src/tests/unit/test_utils.py +0 -0
{elody-0.0.190 → elody-0.0.192}/src/elody/object_configurations/base_object_configuration.py
RENAMED
|
@@ -103,6 +103,8 @@ class BaseObjectConfiguration(ABC):
|
|
|
103
103
|
)
|
|
104
104
|
if sanitized_value:
|
|
105
105
|
sanitized_document[key] = sanitized_value
|
|
106
|
+
elif isinstance(value, list):
|
|
107
|
+
sanitized_document[key] = [element for element in value if element]
|
|
106
108
|
elif value:
|
|
107
109
|
sanitized_document[key] = value
|
|
108
110
|
return sanitized_document
|
|
@@ -45,10 +45,10 @@ class ElodyConfiguration(BaseObjectConfiguration):
|
|
|
45
45
|
flat_post_body={},
|
|
46
46
|
document_defaults={},
|
|
47
47
|
):
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
48
|
+
flat_post_body = flat_post_body or flatten_dict(
|
|
49
|
+
self.document_info()["object_lists"],
|
|
50
|
+
post_body if isinstance(post_body, dict) else {},
|
|
51
|
+
)
|
|
52
52
|
_id = document_defaults.get("_id", str(uuid4()))
|
|
53
53
|
|
|
54
54
|
identifiers = []
|
|
@@ -66,14 +66,17 @@ class ElodyConfiguration(BaseObjectConfiguration):
|
|
|
66
66
|
"schema": {"type": self.SCHEMA_TYPE, "version": self.SCHEMA_VERSION},
|
|
67
67
|
}
|
|
68
68
|
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
69
|
+
if isinstance(post_body, dict):
|
|
70
|
+
for key, object_list_key in self.document_info()["object_lists"].items():
|
|
71
|
+
if not key.startswith("lookup.virtual_relations"):
|
|
72
|
+
post_body[key] = self._merge_object_lists(
|
|
73
|
+
document_defaults.get(key, []),
|
|
74
|
+
post_body.get(key, []),
|
|
75
|
+
object_list_key,
|
|
76
|
+
)
|
|
77
|
+
document = {**template, **document_defaults, **post_body}
|
|
78
|
+
else:
|
|
79
|
+
document = {**template, **document_defaults}
|
|
77
80
|
document = self._pre_crud_hook(crud="create", document=document)
|
|
78
81
|
return document
|
|
79
82
|
|
|
@@ -29,9 +29,11 @@ class MultiTenantPolicy(BaseAuthenticationPolicy):
|
|
|
29
29
|
|
|
30
30
|
def __allowed_url_rule_with_api_key_hash(self, url_rule):
|
|
31
31
|
return str(url_rule) in [
|
|
32
|
-
"/
|
|
32
|
+
"/download/<string:app_id>/<string:mediafile_id_prefix>/<string:mediafile_id>/<string:filename>",
|
|
33
|
+
"/media/<string:app_id>/<string:mediafile_id_prefix>/<string:mediafile_id>/<string:filename>",
|
|
33
34
|
"/mediafiles/<string:id>",
|
|
34
35
|
"/mediafiles/<string:id>/copyright",
|
|
36
|
+
"/tickets/<string:id>",
|
|
35
37
|
]
|
|
36
38
|
|
|
37
39
|
def __get_tenant_id_from_hashed_api_key(self, api_key_hash):
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{elody-0.0.190 → elody-0.0.192}/src/elody/policies/authorization/filter_generic_objects_policy.py
RENAMED
|
File without changes
|
{elody-0.0.190 → elody-0.0.192}/src/elody/policies/authorization/filter_generic_objects_policy_v2.py
RENAMED
|
File without changes
|
{elody-0.0.190 → elody-0.0.192}/src/elody/policies/authorization/generic_object_detail_policy.py
RENAMED
|
File without changes
|
{elody-0.0.190 → elody-0.0.192}/src/elody/policies/authorization/generic_object_mediafiles_policy.py
RENAMED
|
File without changes
|
{elody-0.0.190 → elody-0.0.192}/src/elody/policies/authorization/generic_object_metadata_policy.py
RENAMED
|
File without changes
|
{elody-0.0.190 → elody-0.0.192}/src/elody/policies/authorization/generic_object_relations_policy.py
RENAMED
|
File without changes
|
{elody-0.0.190 → elody-0.0.192}/src/elody/policies/authorization/generic_object_request_policy.py
RENAMED
|
File without changes
|
{elody-0.0.190 → elody-0.0.192}/src/elody/policies/authorization/generic_object_request_policy_v2.py
RENAMED
|
File without changes
|
{elody-0.0.190 → elody-0.0.192}/src/elody/policies/authorization/mediafile_derivatives_policy.py
RENAMED
|
File without changes
|
{elody-0.0.190 → elody-0.0.192}/src/elody/policies/authorization/mediafile_download_policy.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|