elody 0.0.230__tar.gz → 0.0.232__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.230 → elody-0.0.232}/PKG-INFO +1 -1
- {elody-0.0.230 → elody-0.0.232}/pyproject.toml +1 -1
- {elody-0.0.230 → elody-0.0.232}/src/elody/object_configurations/base_object_configuration.py +6 -11
- {elody-0.0.230 → elody-0.0.232}/src/elody/policies/permission_handler.py +4 -0
- {elody-0.0.230 → elody-0.0.232}/src/elody.egg-info/PKG-INFO +1 -1
- {elody-0.0.230 → elody-0.0.232}/LICENSE +0 -0
- {elody-0.0.230 → elody-0.0.232}/README.md +0 -0
- {elody-0.0.230 → elody-0.0.232}/setup.cfg +0 -0
- {elody-0.0.230 → elody-0.0.232}/src/__init__.py +0 -0
- {elody-0.0.230 → elody-0.0.232}/src/elody/__init__.py +0 -0
- {elody-0.0.230 → elody-0.0.232}/src/elody/client.py +0 -0
- {elody-0.0.230 → elody-0.0.232}/src/elody/csv.py +0 -0
- {elody-0.0.230 → elody-0.0.232}/src/elody/error_codes.py +0 -0
- {elody-0.0.230 → elody-0.0.232}/src/elody/exceptions.py +0 -0
- {elody-0.0.230 → elody-0.0.232}/src/elody/job.py +0 -0
- {elody-0.0.230 → elody-0.0.232}/src/elody/loader.py +0 -0
- {elody-0.0.230 → elody-0.0.232}/src/elody/migration/__init__.py +0 -0
- {elody-0.0.230 → elody-0.0.232}/src/elody/migration/base_object_migrator.py +0 -0
- {elody-0.0.230 → elody-0.0.232}/src/elody/object_configurations/__init__.py +0 -0
- {elody-0.0.230 → elody-0.0.232}/src/elody/object_configurations/elody_configuration.py +0 -0
- {elody-0.0.230 → elody-0.0.232}/src/elody/object_configurations/job_configuration.py +0 -0
- {elody-0.0.230 → elody-0.0.232}/src/elody/object_configurations/saved_search_configuration.py +0 -0
- {elody-0.0.230 → elody-0.0.232}/src/elody/policies/__init__.py +0 -0
- {elody-0.0.230 → elody-0.0.232}/src/elody/policies/authentication/__init__.py +0 -0
- {elody-0.0.230 → elody-0.0.232}/src/elody/policies/authentication/base_user_tenant_validation_policy.py +0 -0
- {elody-0.0.230 → elody-0.0.232}/src/elody/policies/authentication/multi_tenant_policy.py +0 -0
- {elody-0.0.230 → elody-0.0.232}/src/elody/policies/authentication/x_user_headers_policy.py +0 -0
- {elody-0.0.230 → elody-0.0.232}/src/elody/policies/authorization/__init__.py +0 -0
- {elody-0.0.230 → elody-0.0.232}/src/elody/policies/authorization/filter_generic_objects_policy.py +0 -0
- {elody-0.0.230 → elody-0.0.232}/src/elody/policies/authorization/filter_generic_objects_policy_v2.py +0 -0
- {elody-0.0.230 → elody-0.0.232}/src/elody/policies/authorization/generic_object_detail_policy.py +0 -0
- {elody-0.0.230 → elody-0.0.232}/src/elody/policies/authorization/generic_object_mediafiles_policy.py +0 -0
- {elody-0.0.230 → elody-0.0.232}/src/elody/policies/authorization/generic_object_metadata_policy.py +0 -0
- {elody-0.0.230 → elody-0.0.232}/src/elody/policies/authorization/generic_object_relations_policy.py +0 -0
- {elody-0.0.230 → elody-0.0.232}/src/elody/policies/authorization/generic_object_request_policy.py +0 -0
- {elody-0.0.230 → elody-0.0.232}/src/elody/policies/authorization/generic_object_request_policy_v2.py +0 -0
- {elody-0.0.230 → elody-0.0.232}/src/elody/policies/authorization/mediafile_derivatives_policy.py +0 -0
- {elody-0.0.230 → elody-0.0.232}/src/elody/policies/authorization/mediafile_download_policy.py +0 -0
- {elody-0.0.230 → elody-0.0.232}/src/elody/policies/authorization/multi_tenant_policy.py +0 -0
- {elody-0.0.230 → elody-0.0.232}/src/elody/policies/authorization/tenant_request_policy.py +0 -0
- {elody-0.0.230 → elody-0.0.232}/src/elody/policies/helpers.py +0 -0
- {elody-0.0.230 → elody-0.0.232}/src/elody/schemas.py +0 -0
- {elody-0.0.230 → elody-0.0.232}/src/elody/util.py +0 -0
- {elody-0.0.230 → elody-0.0.232}/src/elody/validator.py +0 -0
- {elody-0.0.230 → elody-0.0.232}/src/elody.egg-info/SOURCES.txt +0 -0
- {elody-0.0.230 → elody-0.0.232}/src/elody.egg-info/dependency_links.txt +0 -0
- {elody-0.0.230 → elody-0.0.232}/src/elody.egg-info/requires.txt +0 -0
- {elody-0.0.230 → elody-0.0.232}/src/elody.egg-info/top_level.txt +0 -0
- {elody-0.0.230 → elody-0.0.232}/src/tests/__init_.py +0 -0
- {elody-0.0.230 → elody-0.0.232}/src/tests/data.py +0 -0
- {elody-0.0.230 → elody-0.0.232}/src/tests/unit/__init__.py +0 -0
- {elody-0.0.230 → elody-0.0.232}/src/tests/unit/test_csv.py +0 -0
- {elody-0.0.230 → elody-0.0.232}/src/tests/unit/test_utils.py +0 -0
{elody-0.0.230 → elody-0.0.232}/src/elody/object_configurations/base_object_configuration.py
RENAMED
|
@@ -172,7 +172,7 @@ class BaseObjectConfiguration(ABC):
|
|
|
172
172
|
):
|
|
173
173
|
if index == 0 and not any(info["object_list"] for info in keys_info):
|
|
174
174
|
if value in ["ANY_MATCH", "NONE_MATCH"]:
|
|
175
|
-
value = {"$
|
|
175
|
+
value = {"$nin" if value == "ANY_MATCH" else "$in": [None, ""]}
|
|
176
176
|
matcher = {".".join(info["key"] for info in keys_info): value}
|
|
177
177
|
if inner_exact_matches := kwargs.get("inner_exact_matches"):
|
|
178
178
|
matcher.update(inner_exact_matches)
|
|
@@ -189,16 +189,11 @@ class BaseObjectConfiguration(ABC):
|
|
|
189
189
|
),
|
|
190
190
|
}
|
|
191
191
|
}
|
|
192
|
-
if value
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
"NOR_MATCHER": [
|
|
198
|
-
{info["key"]: {"$all": [elem_match]}},
|
|
199
|
-
{info["key"]: {"$all": [elem_match_with_exists_operator]}},
|
|
200
|
-
]
|
|
201
|
-
}
|
|
192
|
+
if value == "NONE_MATCH":
|
|
193
|
+
elem_match["$elemMatch"][keys_info[index + 1]["key"]] = {
|
|
194
|
+
"$nin": [None, ""]
|
|
195
|
+
}
|
|
196
|
+
return {"NOR_MATCHER": [{info["key"]: {"$all": [elem_match]}}]}
|
|
202
197
|
return elem_match if index > 0 else {info["key"]: {"$all": [elem_match]}}
|
|
203
198
|
|
|
204
199
|
raise Exception(f"Unable to build nested matcher. See keys_info: {keys_info}")
|
|
@@ -11,6 +11,7 @@ from elody.util import flatten_dict, interpret_flat_key
|
|
|
11
11
|
from flask import g
|
|
12
12
|
from inuits_policy_based_auth.contexts.user_context import UserContext
|
|
13
13
|
from logging_elody.log import log # pyright: ignore
|
|
14
|
+
from os import getenv
|
|
14
15
|
from storage.storagemanager import StorageManager # pyright: ignore
|
|
15
16
|
from werkzeug.exceptions import NotFound
|
|
16
17
|
|
|
@@ -128,6 +129,7 @@ def __generate_restriction_filters(restrictions_grouped_by_index):
|
|
|
128
129
|
],
|
|
129
130
|
"match_exact": True,
|
|
130
131
|
"or": [],
|
|
132
|
+
"policy_signature": getenv("STATIC_JWT"),
|
|
131
133
|
}
|
|
132
134
|
|
|
133
135
|
for combined_restriction in combined_restrictions:
|
|
@@ -139,6 +141,7 @@ def __generate_restriction_filters(restrictions_grouped_by_index):
|
|
|
139
141
|
"key": restriction["key"],
|
|
140
142
|
"value": [value],
|
|
141
143
|
"match_exact": True,
|
|
144
|
+
"policy_signature": getenv("STATIC_JWT"),
|
|
142
145
|
}
|
|
143
146
|
)
|
|
144
147
|
for key, value in combinations.items():
|
|
@@ -150,6 +153,7 @@ def __generate_restriction_filters(restrictions_grouped_by_index):
|
|
|
150
153
|
"key": key,
|
|
151
154
|
"value": value,
|
|
152
155
|
"match_exact": True,
|
|
156
|
+
"policy_signature": getenv("STATIC_JWT"),
|
|
153
157
|
}
|
|
154
158
|
)
|
|
155
159
|
filter["or"].append(combination)
|
|
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.230 → elody-0.0.232}/src/elody/object_configurations/saved_search_configuration.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{elody-0.0.230 → elody-0.0.232}/src/elody/policies/authorization/filter_generic_objects_policy.py
RENAMED
|
File without changes
|
{elody-0.0.230 → elody-0.0.232}/src/elody/policies/authorization/filter_generic_objects_policy_v2.py
RENAMED
|
File without changes
|
{elody-0.0.230 → elody-0.0.232}/src/elody/policies/authorization/generic_object_detail_policy.py
RENAMED
|
File without changes
|
{elody-0.0.230 → elody-0.0.232}/src/elody/policies/authorization/generic_object_mediafiles_policy.py
RENAMED
|
File without changes
|
{elody-0.0.230 → elody-0.0.232}/src/elody/policies/authorization/generic_object_metadata_policy.py
RENAMED
|
File without changes
|
{elody-0.0.230 → elody-0.0.232}/src/elody/policies/authorization/generic_object_relations_policy.py
RENAMED
|
File without changes
|
{elody-0.0.230 → elody-0.0.232}/src/elody/policies/authorization/generic_object_request_policy.py
RENAMED
|
File without changes
|
{elody-0.0.230 → elody-0.0.232}/src/elody/policies/authorization/generic_object_request_policy_v2.py
RENAMED
|
File without changes
|
{elody-0.0.230 → elody-0.0.232}/src/elody/policies/authorization/mediafile_derivatives_policy.py
RENAMED
|
File without changes
|
{elody-0.0.230 → elody-0.0.232}/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
|