elody 0.0.210__tar.gz → 0.0.212__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.210 → elody-0.0.212}/PKG-INFO +1 -1
- {elody-0.0.210 → elody-0.0.212}/pyproject.toml +1 -1
- elody-0.0.212/src/elody/object_configurations/saved_search_configuration.py +25 -0
- {elody-0.0.210 → elody-0.0.212}/src/elody/policies/authorization/generic_object_metadata_policy.py +5 -3
- {elody-0.0.210 → elody-0.0.212}/src/elody/policies/authorization/generic_object_relations_policy.py +9 -5
- {elody-0.0.210 → elody-0.0.212}/src/elody.egg-info/PKG-INFO +1 -1
- {elody-0.0.210 → elody-0.0.212}/src/elody.egg-info/SOURCES.txt +1 -0
- {elody-0.0.210 → elody-0.0.212}/LICENSE +0 -0
- {elody-0.0.210 → elody-0.0.212}/README.md +0 -0
- {elody-0.0.210 → elody-0.0.212}/setup.cfg +0 -0
- {elody-0.0.210 → elody-0.0.212}/src/__init__.py +0 -0
- {elody-0.0.210 → elody-0.0.212}/src/elody/__init__.py +0 -0
- {elody-0.0.210 → elody-0.0.212}/src/elody/client.py +0 -0
- {elody-0.0.210 → elody-0.0.212}/src/elody/csv.py +0 -0
- {elody-0.0.210 → elody-0.0.212}/src/elody/error_codes.py +0 -0
- {elody-0.0.210 → elody-0.0.212}/src/elody/exceptions.py +0 -0
- {elody-0.0.210 → elody-0.0.212}/src/elody/job.py +0 -0
- {elody-0.0.210 → elody-0.0.212}/src/elody/loader.py +0 -0
- {elody-0.0.210 → elody-0.0.212}/src/elody/migration/__init__.py +0 -0
- {elody-0.0.210 → elody-0.0.212}/src/elody/migration/base_object_migrator.py +0 -0
- {elody-0.0.210 → elody-0.0.212}/src/elody/object_configurations/__init__.py +0 -0
- {elody-0.0.210 → elody-0.0.212}/src/elody/object_configurations/base_object_configuration.py +0 -0
- {elody-0.0.210 → elody-0.0.212}/src/elody/object_configurations/elody_configuration.py +0 -0
- {elody-0.0.210 → elody-0.0.212}/src/elody/object_configurations/job_configuration.py +0 -0
- {elody-0.0.210 → elody-0.0.212}/src/elody/policies/__init__.py +0 -0
- {elody-0.0.210 → elody-0.0.212}/src/elody/policies/authentication/__init__.py +0 -0
- {elody-0.0.210 → elody-0.0.212}/src/elody/policies/authentication/base_user_tenant_validation_policy.py +0 -0
- {elody-0.0.210 → elody-0.0.212}/src/elody/policies/authentication/multi_tenant_policy.py +0 -0
- {elody-0.0.210 → elody-0.0.212}/src/elody/policies/authorization/__init__.py +0 -0
- {elody-0.0.210 → elody-0.0.212}/src/elody/policies/authorization/filter_generic_objects_policy.py +0 -0
- {elody-0.0.210 → elody-0.0.212}/src/elody/policies/authorization/filter_generic_objects_policy_v2.py +0 -0
- {elody-0.0.210 → elody-0.0.212}/src/elody/policies/authorization/generic_object_detail_policy.py +0 -0
- {elody-0.0.210 → elody-0.0.212}/src/elody/policies/authorization/generic_object_mediafiles_policy.py +0 -0
- {elody-0.0.210 → elody-0.0.212}/src/elody/policies/authorization/generic_object_request_policy.py +0 -0
- {elody-0.0.210 → elody-0.0.212}/src/elody/policies/authorization/generic_object_request_policy_v2.py +0 -0
- {elody-0.0.210 → elody-0.0.212}/src/elody/policies/authorization/mediafile_derivatives_policy.py +0 -0
- {elody-0.0.210 → elody-0.0.212}/src/elody/policies/authorization/mediafile_download_policy.py +0 -0
- {elody-0.0.210 → elody-0.0.212}/src/elody/policies/authorization/multi_tenant_policy.py +0 -0
- {elody-0.0.210 → elody-0.0.212}/src/elody/policies/authorization/tenant_request_policy.py +0 -0
- {elody-0.0.210 → elody-0.0.212}/src/elody/policies/helpers.py +0 -0
- {elody-0.0.210 → elody-0.0.212}/src/elody/policies/permission_handler.py +0 -0
- {elody-0.0.210 → elody-0.0.212}/src/elody/schemas.py +0 -0
- {elody-0.0.210 → elody-0.0.212}/src/elody/util.py +0 -0
- {elody-0.0.210 → elody-0.0.212}/src/elody/validator.py +0 -0
- {elody-0.0.210 → elody-0.0.212}/src/elody.egg-info/dependency_links.txt +0 -0
- {elody-0.0.210 → elody-0.0.212}/src/elody.egg-info/requires.txt +0 -0
- {elody-0.0.210 → elody-0.0.212}/src/elody.egg-info/top_level.txt +0 -0
- {elody-0.0.210 → elody-0.0.212}/src/tests/__init_.py +0 -0
- {elody-0.0.210 → elody-0.0.212}/src/tests/data.py +0 -0
- {elody-0.0.210 → elody-0.0.212}/src/tests/unit/__init__.py +0 -0
- {elody-0.0.210 → elody-0.0.212}/src/tests/unit/test_csv.py +0 -0
- {elody-0.0.210 → elody-0.0.212}/src/tests/unit/test_utils.py +0 -0
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
from elody.object_configurations.elody_configuration import ElodyConfiguration
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
class SavedSearchConfiguration(ElodyConfiguration):
|
|
5
|
+
SCHEMA_TYPE = "elody"
|
|
6
|
+
SCHEMA_VERSION = 1
|
|
7
|
+
|
|
8
|
+
def crud(self):
|
|
9
|
+
crud = {"collection": "saved_searches", "collection_history": ""}
|
|
10
|
+
return {**super().crud(), **crud}
|
|
11
|
+
|
|
12
|
+
def document_info(self):
|
|
13
|
+
return super().document_info()
|
|
14
|
+
|
|
15
|
+
def logging(self, flat_document, **kwargs):
|
|
16
|
+
return super().logging(flat_document, **kwargs)
|
|
17
|
+
|
|
18
|
+
def migration(self):
|
|
19
|
+
return super().migration()
|
|
20
|
+
|
|
21
|
+
def serialization(self, from_format, to_format):
|
|
22
|
+
return super().serialization(from_format, to_format)
|
|
23
|
+
|
|
24
|
+
def validation(self):
|
|
25
|
+
return super().validation()
|
{elody-0.0.210 → elody-0.0.212}/src/elody/policies/authorization/generic_object_metadata_policy.py
RENAMED
|
@@ -5,7 +5,7 @@ from elody.policies.permission_handler import (
|
|
|
5
5
|
get_permissions,
|
|
6
6
|
handle_single_item_request,
|
|
7
7
|
)
|
|
8
|
-
from flask import Request # pyright: ignore
|
|
8
|
+
from flask import g, Request # pyright: ignore
|
|
9
9
|
from inuits_policy_based_auth import BaseAuthorizationPolicy # pyright: ignore
|
|
10
10
|
from inuits_policy_based_auth.contexts.policy_context import ( # pyright: ignore
|
|
11
11
|
PolicyContext,
|
|
@@ -62,7 +62,8 @@ class PutRequestRules:
|
|
|
62
62
|
if request.method != "PUT":
|
|
63
63
|
return None
|
|
64
64
|
|
|
65
|
-
content =
|
|
65
|
+
content = g.get("content") or request.json
|
|
66
|
+
content = get_content(item, request, {"metadata": content})
|
|
66
67
|
return handle_single_item_request(
|
|
67
68
|
user_context, item, permissions, "update", content
|
|
68
69
|
)
|
|
@@ -75,7 +76,8 @@ class PatchRequestRules:
|
|
|
75
76
|
if request.method != "PATCH":
|
|
76
77
|
return None
|
|
77
78
|
|
|
78
|
-
content =
|
|
79
|
+
content = g.get("content") or request.json
|
|
80
|
+
content = get_content(item, request, {"metadata": content})
|
|
79
81
|
return handle_single_item_request(
|
|
80
82
|
user_context, item, permissions, "update", content
|
|
81
83
|
)
|
{elody-0.0.210 → elody-0.0.212}/src/elody/policies/authorization/generic_object_relations_policy.py
RENAMED
|
@@ -5,7 +5,7 @@ from elody.policies.permission_handler import (
|
|
|
5
5
|
get_permissions,
|
|
6
6
|
handle_single_item_request,
|
|
7
7
|
)
|
|
8
|
-
from flask import Request # pyright: ignore
|
|
8
|
+
from flask import g, Request # pyright: ignore
|
|
9
9
|
from inuits_policy_based_auth import BaseAuthorizationPolicy # pyright: ignore
|
|
10
10
|
from inuits_policy_based_auth.contexts.policy_context import ( # pyright: ignore
|
|
11
11
|
PolicyContext,
|
|
@@ -58,7 +58,8 @@ class PostRequestRules:
|
|
|
58
58
|
if request.method != "POST":
|
|
59
59
|
return None
|
|
60
60
|
|
|
61
|
-
content =
|
|
61
|
+
content = g.get("content") or request.json
|
|
62
|
+
content = get_content(item, request, {"relations": content})
|
|
62
63
|
return handle_single_item_request(
|
|
63
64
|
user_context, item, permissions, "create", content
|
|
64
65
|
)
|
|
@@ -81,7 +82,8 @@ class PutRequestRules:
|
|
|
81
82
|
if request.method != "PUT":
|
|
82
83
|
return None
|
|
83
84
|
|
|
84
|
-
content =
|
|
85
|
+
content = g.get("content") or request.json
|
|
86
|
+
content = get_content(item, request, {"relations": content})
|
|
85
87
|
return handle_single_item_request(
|
|
86
88
|
user_context, item, permissions, "update", content
|
|
87
89
|
)
|
|
@@ -94,7 +96,8 @@ class PatchRequestRules:
|
|
|
94
96
|
if request.method != "PATCH":
|
|
95
97
|
return None
|
|
96
98
|
|
|
97
|
-
content =
|
|
99
|
+
content = g.get("content") or request.json
|
|
100
|
+
content = get_content(item, request, {"relations": content})
|
|
98
101
|
return handle_single_item_request(
|
|
99
102
|
user_context, item, permissions, "update", content
|
|
100
103
|
)
|
|
@@ -107,7 +110,8 @@ class DeleteRequestRules:
|
|
|
107
110
|
if request.method != "DELETE":
|
|
108
111
|
return None
|
|
109
112
|
|
|
110
|
-
content =
|
|
113
|
+
content = g.get("content") or request.json
|
|
114
|
+
content = get_content(item, request, {"relations": content})
|
|
111
115
|
return handle_single_item_request(
|
|
112
116
|
user_context, item, permissions, "delete", content
|
|
113
117
|
)
|
|
@@ -23,6 +23,7 @@ src/elody/object_configurations/__init__.py
|
|
|
23
23
|
src/elody/object_configurations/base_object_configuration.py
|
|
24
24
|
src/elody/object_configurations/elody_configuration.py
|
|
25
25
|
src/elody/object_configurations/job_configuration.py
|
|
26
|
+
src/elody/object_configurations/saved_search_configuration.py
|
|
26
27
|
src/elody/policies/__init__.py
|
|
27
28
|
src/elody/policies/helpers.py
|
|
28
29
|
src/elody/policies/permission_handler.py
|
|
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.210 → elody-0.0.212}/src/elody/object_configurations/base_object_configuration.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
|
{elody-0.0.210 → elody-0.0.212}/src/elody/policies/authorization/filter_generic_objects_policy.py
RENAMED
|
File without changes
|
{elody-0.0.210 → elody-0.0.212}/src/elody/policies/authorization/filter_generic_objects_policy_v2.py
RENAMED
|
File without changes
|
{elody-0.0.210 → elody-0.0.212}/src/elody/policies/authorization/generic_object_detail_policy.py
RENAMED
|
File without changes
|
{elody-0.0.210 → elody-0.0.212}/src/elody/policies/authorization/generic_object_mediafiles_policy.py
RENAMED
|
File without changes
|
{elody-0.0.210 → elody-0.0.212}/src/elody/policies/authorization/generic_object_request_policy.py
RENAMED
|
File without changes
|
{elody-0.0.210 → elody-0.0.212}/src/elody/policies/authorization/generic_object_request_policy_v2.py
RENAMED
|
File without changes
|
{elody-0.0.210 → elody-0.0.212}/src/elody/policies/authorization/mediafile_derivatives_policy.py
RENAMED
|
File without changes
|
{elody-0.0.210 → elody-0.0.212}/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
|