elody 0.0.207__py3-none-any.whl → 0.0.209__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.
- elody/object_configurations/elody_configuration.py +3 -2
- elody/policies/authentication/base_user_tenant_validation_policy.py +3 -2
- {elody-0.0.207.dist-info → elody-0.0.209.dist-info}/METADATA +1 -1
- {elody-0.0.207.dist-info → elody-0.0.209.dist-info}/RECORD +7 -7
- {elody-0.0.207.dist-info → elody-0.0.209.dist-info}/WHEEL +0 -0
- {elody-0.0.207.dist-info → elody-0.0.209.dist-info}/licenses/LICENSE +0 -0
- {elody-0.0.207.dist-info → elody-0.0.209.dist-info}/top_level.txt +0 -0
|
@@ -52,7 +52,9 @@ class ElodyConfiguration(BaseObjectConfiguration):
|
|
|
52
52
|
_id = document_defaults.get("_id", str(uuid4()))
|
|
53
53
|
timestamp = datetime.now(timezone.utc)
|
|
54
54
|
|
|
55
|
-
identifiers =
|
|
55
|
+
identifiers = (
|
|
56
|
+
post_body.pop("identifiers", []) if isinstance(post_body, dict) else []
|
|
57
|
+
)
|
|
56
58
|
for property in self.document_info().get("identifier_properties", []):
|
|
57
59
|
if identifier := flat_post_body.get(f"metadata.{property}.value"):
|
|
58
60
|
identifiers.append(identifier)
|
|
@@ -65,7 +67,6 @@ class ElodyConfiguration(BaseObjectConfiguration):
|
|
|
65
67
|
_id,
|
|
66
68
|
*identifiers,
|
|
67
69
|
*document_defaults.pop("identifiers", []),
|
|
68
|
-
*post_body.pop("identifiers", []),
|
|
69
70
|
]
|
|
70
71
|
)
|
|
71
72
|
),
|
|
@@ -23,10 +23,10 @@ class BaseUserTenantValidationPolicy(ABC):
|
|
|
23
23
|
) -> dict:
|
|
24
24
|
config = get_object_configuration_mapper().get("user")
|
|
25
25
|
collection = config.crud()["collection"]
|
|
26
|
-
serialize = config.serialization(config.SCHEMA_TYPE, "elody")
|
|
26
|
+
self.serialize = config.serialization(config.SCHEMA_TYPE, "elody")
|
|
27
27
|
|
|
28
28
|
user = storage.get_item_from_collection_by_id(collection, id) or {}
|
|
29
|
-
self.user = serialize(user)
|
|
29
|
+
self.user = self.serialize(user)
|
|
30
30
|
user_context.bag["roles_from_idp"] = deepcopy(user_context.x_tenant.roles)
|
|
31
31
|
user_context.bag["user_metadata_key_for_global_roles"] = (
|
|
32
32
|
user_metadata_key_for_global_roles
|
|
@@ -50,6 +50,7 @@ class BaseUserTenantValidationPolicy(ABC):
|
|
|
50
50
|
def build_user_context_for_authenticated_user(
|
|
51
51
|
self, request, user_context: UserContext, user: dict
|
|
52
52
|
) -> UserContext:
|
|
53
|
+
self.user = self.serialize(user)
|
|
53
54
|
user_context = self.__build_user_context(request, user_context)
|
|
54
55
|
user_context.x_tenant = Tenant()
|
|
55
56
|
user_context.x_tenant.id = self._determine_tenant_id(request, user_context)
|
|
@@ -13,13 +13,13 @@ elody/migration/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
|
13
13
|
elody/migration/base_object_migrator.py,sha256=n8uvgGfjEUy60G47RD7Y-oxp1vHLOauwPMDl87LcxtU,436
|
|
14
14
|
elody/object_configurations/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
15
15
|
elody/object_configurations/base_object_configuration.py,sha256=8wyUq_zqRkGb4Mp198pyxOaGdz2WMZzVOO65s1SDCRw,7393
|
|
16
|
-
elody/object_configurations/elody_configuration.py,sha256=
|
|
16
|
+
elody/object_configurations/elody_configuration.py,sha256=aeCndCipQuS-vSDmuxXlJrB-p2No9QnTrM9GnmhWd3o,7936
|
|
17
17
|
elody/object_configurations/job_configuration.py,sha256=HMDxaRUyfqhIy0q3yQDDMH9uW5iCd7VCmqknQofXNt0,2039
|
|
18
18
|
elody/policies/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
19
19
|
elody/policies/helpers.py,sha256=LTV_Hmg8AN64e6t4glpKhZMsRNYCLN8FC-KQ0-7EmR8,2035
|
|
20
20
|
elody/policies/permission_handler.py,sha256=ovQ1id67GtiEZYl3_2f_QPDn7XkCMGae6xgnpMWNHs8,10233
|
|
21
21
|
elody/policies/authentication/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
22
|
-
elody/policies/authentication/base_user_tenant_validation_policy.py,sha256=
|
|
22
|
+
elody/policies/authentication/base_user_tenant_validation_policy.py,sha256=zQo9tyGDwHHh6Wt3akbaT5CIEG5rqz1DT-BsAtbJNhw,5419
|
|
23
23
|
elody/policies/authentication/multi_tenant_policy.py,sha256=g4ZYUQMmCjgLg09wj0-0lGKsJsRt7h4ppI25o1VdZHw,4039
|
|
24
24
|
elody/policies/authorization/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
25
25
|
elody/policies/authorization/filter_generic_objects_policy.py,sha256=mF32moh8hRetBgG8vQW-rz4xjoRQD2yOxdI740SFSUo,6522
|
|
@@ -34,13 +34,13 @@ elody/policies/authorization/mediafile_derivatives_policy.py,sha256=OwNpbS8i7-Lz
|
|
|
34
34
|
elody/policies/authorization/mediafile_download_policy.py,sha256=XMsKavBucmTh4W1kWOzpFWxJ_ZXgHVK1RS7JB4HjtQo,1979
|
|
35
35
|
elody/policies/authorization/multi_tenant_policy.py,sha256=SA9H7SBjzuh8mY3gYN7pDG8TV7hdI3GEUtNeiZeNL3M,3164
|
|
36
36
|
elody/policies/authorization/tenant_request_policy.py,sha256=dEgblwRAqwWVcE-O7Jn8hVL3OnwDlQhDEOcPlcElBrk,1185
|
|
37
|
-
elody-0.0.
|
|
37
|
+
elody-0.0.209.dist-info/licenses/LICENSE,sha256=gXf5dRMhNSbfLPYYTY_5hsZ1r7UU1OaKQEAQUhuIBkM,18092
|
|
38
38
|
tests/__init_.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
39
39
|
tests/data.py,sha256=Q3oxduf-E3m-Z5G_p3fcs8jVy6g10I7zXKL1m94UVMI,2906
|
|
40
40
|
tests/unit/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
41
41
|
tests/unit/test_csv.py,sha256=NQaOhehfQ4GuXku0Y1SA8DYjJeqqidbF50zEHAi8RZA,15923
|
|
42
42
|
tests/unit/test_utils.py,sha256=g63szcEZyHhCOtrW4BnNbcgVca3oYPIOLjBdIzNwwN0,8784
|
|
43
|
-
elody-0.0.
|
|
44
|
-
elody-0.0.
|
|
45
|
-
elody-0.0.
|
|
46
|
-
elody-0.0.
|
|
43
|
+
elody-0.0.209.dist-info/METADATA,sha256=4t6i8dXoYtLtHxmWg-3lB2dWI9CMHs6_58apWekIurU,23358
|
|
44
|
+
elody-0.0.209.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
45
|
+
elody-0.0.209.dist-info/top_level.txt,sha256=E0mImupLj0KmtUUCXRYEoLDRaSkuiGaOIIseAa0oQ-M,21
|
|
46
|
+
elody-0.0.209.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|