oarepo-runtime 2.0.0.dev58__tar.gz → 2.0.0.dev59__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.
- {oarepo_runtime-2.0.0.dev58 → oarepo_runtime-2.0.0.dev59}/PKG-INFO +1 -1
- {oarepo_runtime-2.0.0.dev58 → oarepo_runtime-2.0.0.dev59}/oarepo_runtime/__init__.py +1 -1
- {oarepo_runtime-2.0.0.dev58 → oarepo_runtime-2.0.0.dev59}/oarepo_runtime/services/config/__init__.py +2 -0
- {oarepo_runtime-2.0.0.dev58 → oarepo_runtime-2.0.0.dev59}/oarepo_runtime/services/config/link_conditions.py +17 -0
- {oarepo_runtime-2.0.0.dev58 → oarepo_runtime-2.0.0.dev59}/.gitignore +0 -0
- {oarepo_runtime-2.0.0.dev58 → oarepo_runtime-2.0.0.dev59}/LICENSE +0 -0
- {oarepo_runtime-2.0.0.dev58 → oarepo_runtime-2.0.0.dev59}/README.md +0 -0
- {oarepo_runtime-2.0.0.dev58 → oarepo_runtime-2.0.0.dev59}/oarepo_runtime/api.py +0 -0
- {oarepo_runtime-2.0.0.dev58 → oarepo_runtime-2.0.0.dev59}/oarepo_runtime/cli/__init__.py +0 -0
- {oarepo_runtime-2.0.0.dev58 → oarepo_runtime-2.0.0.dev59}/oarepo_runtime/cli/search.py +0 -0
- {oarepo_runtime-2.0.0.dev58 → oarepo_runtime-2.0.0.dev59}/oarepo_runtime/config.py +0 -0
- {oarepo_runtime-2.0.0.dev58 → oarepo_runtime-2.0.0.dev59}/oarepo_runtime/ext.py +0 -0
- {oarepo_runtime-2.0.0.dev58 → oarepo_runtime-2.0.0.dev59}/oarepo_runtime/info/__init__.py +0 -0
- {oarepo_runtime-2.0.0.dev58 → oarepo_runtime-2.0.0.dev59}/oarepo_runtime/info/views.py +0 -0
- {oarepo_runtime-2.0.0.dev58 → oarepo_runtime-2.0.0.dev59}/oarepo_runtime/proxies.py +0 -0
- {oarepo_runtime-2.0.0.dev58 → oarepo_runtime-2.0.0.dev59}/oarepo_runtime/py.typed +0 -0
- {oarepo_runtime-2.0.0.dev58 → oarepo_runtime-2.0.0.dev59}/oarepo_runtime/records/__init__.py +0 -0
- {oarepo_runtime-2.0.0.dev58 → oarepo_runtime-2.0.0.dev59}/oarepo_runtime/records/drafts.py +0 -0
- {oarepo_runtime-2.0.0.dev58 → oarepo_runtime-2.0.0.dev59}/oarepo_runtime/records/mapping.py +0 -0
- {oarepo_runtime-2.0.0.dev58 → oarepo_runtime-2.0.0.dev59}/oarepo_runtime/records/pid_providers.py +0 -0
- {oarepo_runtime-2.0.0.dev58 → oarepo_runtime-2.0.0.dev59}/oarepo_runtime/records/systemfields/__init__.py +0 -0
- {oarepo_runtime-2.0.0.dev58 → oarepo_runtime-2.0.0.dev59}/oarepo_runtime/records/systemfields/base.py +0 -0
- {oarepo_runtime-2.0.0.dev58 → oarepo_runtime-2.0.0.dev59}/oarepo_runtime/records/systemfields/custom_fields.py +0 -0
- {oarepo_runtime-2.0.0.dev58 → oarepo_runtime-2.0.0.dev59}/oarepo_runtime/records/systemfields/mapping.py +0 -0
- {oarepo_runtime-2.0.0.dev58 → oarepo_runtime-2.0.0.dev59}/oarepo_runtime/records/systemfields/publication_status.py +0 -0
- {oarepo_runtime-2.0.0.dev58 → oarepo_runtime-2.0.0.dev59}/oarepo_runtime/records/systemfields/relations.py +0 -0
- {oarepo_runtime-2.0.0.dev58 → oarepo_runtime-2.0.0.dev59}/oarepo_runtime/records/systemfields/selectors.py +0 -0
- {oarepo_runtime-2.0.0.dev58 → oarepo_runtime-2.0.0.dev59}/oarepo_runtime/resources/__init__.py +0 -0
- {oarepo_runtime-2.0.0.dev58 → oarepo_runtime-2.0.0.dev59}/oarepo_runtime/resources/config.py +0 -0
- {oarepo_runtime-2.0.0.dev58 → oarepo_runtime-2.0.0.dev59}/oarepo_runtime/resources/signposting/__init__.py +0 -0
- {oarepo_runtime-2.0.0.dev58 → oarepo_runtime-2.0.0.dev59}/oarepo_runtime/services/__init__.py +0 -0
- {oarepo_runtime-2.0.0.dev58 → oarepo_runtime-2.0.0.dev59}/oarepo_runtime/services/config/components.py +0 -0
- {oarepo_runtime-2.0.0.dev58 → oarepo_runtime-2.0.0.dev59}/oarepo_runtime/services/config/permissions.py +0 -0
- {oarepo_runtime-2.0.0.dev58 → oarepo_runtime-2.0.0.dev59}/oarepo_runtime/services/facets/__init__.py +0 -0
- {oarepo_runtime-2.0.0.dev58 → oarepo_runtime-2.0.0.dev59}/oarepo_runtime/services/facets/base.py +0 -0
- {oarepo_runtime-2.0.0.dev58 → oarepo_runtime-2.0.0.dev59}/oarepo_runtime/services/facets/date.py +0 -0
- {oarepo_runtime-2.0.0.dev58 → oarepo_runtime-2.0.0.dev59}/oarepo_runtime/services/facets/nested_facet.py +0 -0
- {oarepo_runtime-2.0.0.dev58 → oarepo_runtime-2.0.0.dev59}/oarepo_runtime/services/facets/params.py +0 -0
- {oarepo_runtime-2.0.0.dev58 → oarepo_runtime-2.0.0.dev59}/oarepo_runtime/services/facets/utils.py +0 -0
- {oarepo_runtime-2.0.0.dev58 → oarepo_runtime-2.0.0.dev59}/oarepo_runtime/services/generators.py +0 -0
- {oarepo_runtime-2.0.0.dev58 → oarepo_runtime-2.0.0.dev59}/oarepo_runtime/services/queryparsers/__init__.py +0 -0
- {oarepo_runtime-2.0.0.dev58 → oarepo_runtime-2.0.0.dev59}/oarepo_runtime/services/queryparsers/transformer.py +0 -0
- {oarepo_runtime-2.0.0.dev58 → oarepo_runtime-2.0.0.dev59}/oarepo_runtime/services/records/__init__.py +0 -0
- {oarepo_runtime-2.0.0.dev58 → oarepo_runtime-2.0.0.dev59}/oarepo_runtime/services/records/custom_fields.py +0 -0
- {oarepo_runtime-2.0.0.dev58 → oarepo_runtime-2.0.0.dev59}/oarepo_runtime/services/records/links.py +0 -0
- {oarepo_runtime-2.0.0.dev58 → oarepo_runtime-2.0.0.dev59}/oarepo_runtime/services/records/mapping.py +0 -0
- {oarepo_runtime-2.0.0.dev58 → oarepo_runtime-2.0.0.dev59}/oarepo_runtime/services/results.py +0 -0
- {oarepo_runtime-2.0.0.dev58 → oarepo_runtime-2.0.0.dev59}/oarepo_runtime/services/schema/__init__.py +0 -0
- {oarepo_runtime-2.0.0.dev58 → oarepo_runtime-2.0.0.dev59}/oarepo_runtime/services/schema/i18n.py +0 -0
- {oarepo_runtime-2.0.0.dev58 → oarepo_runtime-2.0.0.dev59}/oarepo_runtime/services/schema/i18n_ui.py +0 -0
- {oarepo_runtime-2.0.0.dev58 → oarepo_runtime-2.0.0.dev59}/oarepo_runtime/services/schema/ui.py +0 -0
- {oarepo_runtime-2.0.0.dev58 → oarepo_runtime-2.0.0.dev59}/oarepo_runtime/typing.py +0 -0
- {oarepo_runtime-2.0.0.dev58 → oarepo_runtime-2.0.0.dev59}/pyproject.toml +0 -0
{oarepo_runtime-2.0.0.dev58 → oarepo_runtime-2.0.0.dev59}/oarepo_runtime/services/config/__init__.py
RENAMED
|
@@ -15,6 +15,7 @@ from .link_conditions import (
|
|
|
15
15
|
has_draft_permission,
|
|
16
16
|
has_permission,
|
|
17
17
|
has_published_record,
|
|
18
|
+
is_draft,
|
|
18
19
|
is_published_record,
|
|
19
20
|
)
|
|
20
21
|
from .permissions import EveryonePermissionPolicy
|
|
@@ -25,5 +26,6 @@ __all__ = (
|
|
|
25
26
|
"has_draft_permission",
|
|
26
27
|
"has_permission",
|
|
27
28
|
"has_published_record",
|
|
29
|
+
"is_draft",
|
|
28
30
|
"is_published_record",
|
|
29
31
|
)
|
|
@@ -51,6 +51,14 @@ class Condition:
|
|
|
51
51
|
{"__call__": lambda _, obj, ctx: self(obj, ctx) or other(obj, ctx)},
|
|
52
52
|
)()
|
|
53
53
|
|
|
54
|
+
def __invert__(self):
|
|
55
|
+
"""Negate the condition using a logical NOT."""
|
|
56
|
+
return type(
|
|
57
|
+
"Not",
|
|
58
|
+
(Condition,),
|
|
59
|
+
{"__call__": lambda _, obj, ctx: not self(obj, ctx)},
|
|
60
|
+
)()
|
|
61
|
+
|
|
54
62
|
|
|
55
63
|
class has_permission(Condition): # noqa: N801
|
|
56
64
|
"""A condition to check if a user has the specified permission for a given record."""
|
|
@@ -121,3 +129,12 @@ class is_published_record(Condition): # noqa: N801
|
|
|
121
129
|
"""Check if the given record is draft."""
|
|
122
130
|
_ = ctx
|
|
123
131
|
return not getattr(obj, "is_draft", False)
|
|
132
|
+
|
|
133
|
+
|
|
134
|
+
class is_draft(Condition): # noqa: N801
|
|
135
|
+
"""Shortcut for links to determine if record is a draft."""
|
|
136
|
+
|
|
137
|
+
def __call__(self, obj: RecordBase, ctx: dict):
|
|
138
|
+
"""Check if the given record is draft."""
|
|
139
|
+
_ = ctx
|
|
140
|
+
return getattr(obj, "is_draft", False)
|
|
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
|
{oarepo_runtime-2.0.0.dev58 → oarepo_runtime-2.0.0.dev59}/oarepo_runtime/records/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{oarepo_runtime-2.0.0.dev58 → oarepo_runtime-2.0.0.dev59}/oarepo_runtime/records/pid_providers.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
|
{oarepo_runtime-2.0.0.dev58 → oarepo_runtime-2.0.0.dev59}/oarepo_runtime/resources/__init__.py
RENAMED
|
File without changes
|
{oarepo_runtime-2.0.0.dev58 → oarepo_runtime-2.0.0.dev59}/oarepo_runtime/resources/config.py
RENAMED
|
File without changes
|
|
File without changes
|
{oarepo_runtime-2.0.0.dev58 → oarepo_runtime-2.0.0.dev59}/oarepo_runtime/services/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{oarepo_runtime-2.0.0.dev58 → oarepo_runtime-2.0.0.dev59}/oarepo_runtime/services/facets/__init__.py
RENAMED
|
File without changes
|
{oarepo_runtime-2.0.0.dev58 → oarepo_runtime-2.0.0.dev59}/oarepo_runtime/services/facets/base.py
RENAMED
|
File without changes
|
{oarepo_runtime-2.0.0.dev58 → oarepo_runtime-2.0.0.dev59}/oarepo_runtime/services/facets/date.py
RENAMED
|
File without changes
|
|
File without changes
|
{oarepo_runtime-2.0.0.dev58 → oarepo_runtime-2.0.0.dev59}/oarepo_runtime/services/facets/params.py
RENAMED
|
File without changes
|
{oarepo_runtime-2.0.0.dev58 → oarepo_runtime-2.0.0.dev59}/oarepo_runtime/services/facets/utils.py
RENAMED
|
File without changes
|
{oarepo_runtime-2.0.0.dev58 → oarepo_runtime-2.0.0.dev59}/oarepo_runtime/services/generators.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{oarepo_runtime-2.0.0.dev58 → oarepo_runtime-2.0.0.dev59}/oarepo_runtime/services/records/links.py
RENAMED
|
File without changes
|
{oarepo_runtime-2.0.0.dev58 → oarepo_runtime-2.0.0.dev59}/oarepo_runtime/services/records/mapping.py
RENAMED
|
File without changes
|
{oarepo_runtime-2.0.0.dev58 → oarepo_runtime-2.0.0.dev59}/oarepo_runtime/services/results.py
RENAMED
|
File without changes
|
{oarepo_runtime-2.0.0.dev58 → oarepo_runtime-2.0.0.dev59}/oarepo_runtime/services/schema/__init__.py
RENAMED
|
File without changes
|
{oarepo_runtime-2.0.0.dev58 → oarepo_runtime-2.0.0.dev59}/oarepo_runtime/services/schema/i18n.py
RENAMED
|
File without changes
|
{oarepo_runtime-2.0.0.dev58 → oarepo_runtime-2.0.0.dev59}/oarepo_runtime/services/schema/i18n_ui.py
RENAMED
|
File without changes
|
{oarepo_runtime-2.0.0.dev58 → oarepo_runtime-2.0.0.dev59}/oarepo_runtime/services/schema/ui.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|