pilot-platform-common 0.7.2__tar.gz → 0.7.3__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.
- {pilot-platform-common-0.7.2 → pilot-platform-common-0.7.3}/PKG-INFO +1 -1
- {pilot-platform-common-0.7.2 → pilot-platform-common-0.7.3}/common/permissions/permissions.py +6 -2
- {pilot-platform-common-0.7.2 → pilot-platform-common-0.7.3}/pilot_platform_common.egg-info/PKG-INFO +1 -1
- {pilot-platform-common-0.7.2 → pilot-platform-common-0.7.3}/pyproject.toml +1 -1
- {pilot-platform-common-0.7.2 → pilot-platform-common-0.7.3}/setup.py +1 -1
- {pilot-platform-common-0.7.2 → pilot-platform-common-0.7.3}/tests/permissions/test_permissions.py +4 -0
- {pilot-platform-common-0.7.2 → pilot-platform-common-0.7.3}/README.md +0 -0
- {pilot-platform-common-0.7.2 → pilot-platform-common-0.7.3}/common/__init__.py +0 -0
- {pilot-platform-common-0.7.2 → pilot-platform-common-0.7.3}/common/geid/__init__.py +0 -0
- {pilot-platform-common-0.7.2 → pilot-platform-common-0.7.3}/common/geid/geid_client.py +0 -0
- {pilot-platform-common-0.7.2 → pilot-platform-common-0.7.3}/common/jwt_handler/JWTHandler.py +0 -0
- {pilot-platform-common-0.7.2 → pilot-platform-common-0.7.3}/common/jwt_handler/__init__.py +0 -0
- {pilot-platform-common-0.7.2 → pilot-platform-common-0.7.3}/common/jwt_handler/jwt_handler_exception.py +0 -0
- {pilot-platform-common-0.7.2 → pilot-platform-common-0.7.3}/common/jwt_handler/models.py +0 -0
- {pilot-platform-common-0.7.2 → pilot-platform-common-0.7.3}/common/logging/__init__.py +0 -0
- {pilot-platform-common-0.7.2 → pilot-platform-common-0.7.3}/common/logging/formatter.py +0 -0
- {pilot-platform-common-0.7.2 → pilot-platform-common-0.7.3}/common/logging/logger.py +0 -0
- {pilot-platform-common-0.7.2 → pilot-platform-common-0.7.3}/common/logging/logging.py +0 -0
- {pilot-platform-common-0.7.2 → pilot-platform-common-0.7.3}/common/models/__init__.py +0 -0
- {pilot-platform-common-0.7.2 → pilot-platform-common-0.7.3}/common/models/config_center_policy.py +0 -0
- {pilot-platform-common-0.7.2 → pilot-platform-common-0.7.3}/common/models/service_id_generator.py +0 -0
- {pilot-platform-common-0.7.2 → pilot-platform-common-0.7.3}/common/object_storage_adaptor/__init__.py +0 -0
- {pilot-platform-common-0.7.2 → pilot-platform-common-0.7.3}/common/object_storage_adaptor/base_client.py +0 -0
- {pilot-platform-common-0.7.2 → pilot-platform-common-0.7.3}/common/object_storage_adaptor/boto3_admin_client.py +0 -0
- {pilot-platform-common-0.7.2 → pilot-platform-common-0.7.3}/common/object_storage_adaptor/boto3_client.py +0 -0
- {pilot-platform-common-0.7.2 → pilot-platform-common-0.7.3}/common/object_storage_adaptor/minio_policy_client.py +0 -0
- {pilot-platform-common-0.7.2 → pilot-platform-common-0.7.3}/common/permissions/__init__.py +0 -0
- {pilot-platform-common-0.7.2 → pilot-platform-common-0.7.3}/common/permissions/exceptions.py +0 -0
- {pilot-platform-common-0.7.2 → pilot-platform-common-0.7.3}/common/permissions/permissions_manager.py +0 -0
- {pilot-platform-common-0.7.2 → pilot-platform-common-0.7.3}/common/permissions/schemas.py +0 -0
- {pilot-platform-common-0.7.2 → pilot-platform-common-0.7.3}/common/project/__init__.py +0 -0
- {pilot-platform-common-0.7.2 → pilot-platform-common-0.7.3}/common/project/project_client.py +0 -0
- {pilot-platform-common-0.7.2 → pilot-platform-common-0.7.3}/common/project/project_exceptions.py +0 -0
- {pilot-platform-common-0.7.2 → pilot-platform-common-0.7.3}/common/services/__init__.py +0 -0
- {pilot-platform-common-0.7.2 → pilot-platform-common-0.7.3}/common/services/auth_client.py +0 -0
- {pilot-platform-common-0.7.2 → pilot-platform-common-0.7.3}/common/vault/__init__.py +0 -0
- {pilot-platform-common-0.7.2 → pilot-platform-common-0.7.3}/common/vault/vault_client.py +0 -0
- {pilot-platform-common-0.7.2 → pilot-platform-common-0.7.3}/common/vault/vault_exception.py +0 -0
- {pilot-platform-common-0.7.2 → pilot-platform-common-0.7.3}/pilot_platform_common.egg-info/SOURCES.txt +0 -0
- {pilot-platform-common-0.7.2 → pilot-platform-common-0.7.3}/pilot_platform_common.egg-info/dependency_links.txt +0 -0
- {pilot-platform-common-0.7.2 → pilot-platform-common-0.7.3}/pilot_platform_common.egg-info/requires.txt +0 -0
- {pilot-platform-common-0.7.2 → pilot-platform-common-0.7.3}/pilot_platform_common.egg-info/top_level.txt +0 -0
- {pilot-platform-common-0.7.2 → pilot-platform-common-0.7.3}/setup.cfg +0 -0
- {pilot-platform-common-0.7.2 → pilot-platform-common-0.7.3}/tests/__init__.py +0 -0
- {pilot-platform-common-0.7.2 → pilot-platform-common-0.7.3}/tests/conftest.py +0 -0
- {pilot-platform-common-0.7.2 → pilot-platform-common-0.7.3}/tests/fixtures/__init__.py +0 -0
- {pilot-platform-common-0.7.2 → pilot-platform-common-0.7.3}/tests/fixtures/fake.py +0 -0
- {pilot-platform-common-0.7.2 → pilot-platform-common-0.7.3}/tests/fixtures/metadata.py +0 -0
- {pilot-platform-common-0.7.2 → pilot-platform-common-0.7.3}/tests/permissions/__init__.py +0 -0
- {pilot-platform-common-0.7.2 → pilot-platform-common-0.7.3}/tests/permissions/test_auth_client.py +0 -0
- {pilot-platform-common-0.7.2 → pilot-platform-common-0.7.3}/tests/permissions/test_permissions_manager.py +0 -0
- {pilot-platform-common-0.7.2 → pilot-platform-common-0.7.3}/tests/test_formatter.py +0 -0
- {pilot-platform-common-0.7.2 → pilot-platform-common-0.7.3}/tests/test_geid_client.py +0 -0
- {pilot-platform-common-0.7.2 → pilot-platform-common-0.7.3}/tests/test_jwt_handler.py +0 -0
- {pilot-platform-common-0.7.2 → pilot-platform-common-0.7.3}/tests/test_logging.py +0 -0
- {pilot-platform-common-0.7.2 → pilot-platform-common-0.7.3}/tests/test_project_client.py +0 -0
- {pilot-platform-common-0.7.2 → pilot-platform-common-0.7.3}/tests/test_vault_client.py +0 -0
{pilot-platform-common-0.7.2 → pilot-platform-common-0.7.3}/common/permissions/permissions.py
RENAMED
|
@@ -92,7 +92,7 @@ async def has_file_permission(
|
|
|
92
92
|
zone = 'greenroom' if file_entity['zone'] == 0 else 'core'
|
|
93
93
|
|
|
94
94
|
folder_path_split = get_folder_path(file_entity)
|
|
95
|
-
root_folder = folder_path_split[0]
|
|
95
|
+
root_folder = folder_path_split[0] if folder_path_split else None
|
|
96
96
|
|
|
97
97
|
if root_folder == 'shared':
|
|
98
98
|
if len(folder_path_split) == 1:
|
|
@@ -137,7 +137,11 @@ def get_folder_path(file_entity: dict[str, str]) -> list[str]:
|
|
|
137
137
|
path_for_permissions = 'restore_path'
|
|
138
138
|
else:
|
|
139
139
|
path_for_permissions = 'parent_path'
|
|
140
|
-
|
|
140
|
+
path = file_entity.get(path_for_permissions, '')
|
|
141
|
+
if path:
|
|
142
|
+
return path.split('/')
|
|
143
|
+
else:
|
|
144
|
+
return []
|
|
141
145
|
|
|
142
146
|
|
|
143
147
|
def get_name_or_path(file_entity: dict[str, str], folder_path_split: list[str]) -> str:
|
|
@@ -11,7 +11,7 @@ long_description = (this_directory / 'README.md').read_text()
|
|
|
11
11
|
|
|
12
12
|
setuptools.setup(
|
|
13
13
|
name='pilot-platform-common',
|
|
14
|
-
version='0.7.
|
|
14
|
+
version='0.7.3',
|
|
15
15
|
author='Indoc Systems',
|
|
16
16
|
author_email='etaylor@indocresearch.org',
|
|
17
17
|
description='Generates entity ID and connects with Vault (secret engine) to retrieve credentials',
|
{pilot-platform-common-0.7.2 → pilot-platform-common-0.7.3}/tests/permissions/test_permissions.py
RENAMED
|
@@ -379,6 +379,8 @@ class TestFilePermissions:
|
|
|
379
379
|
'zone': 'core',
|
|
380
380
|
'container_code': 'test_project',
|
|
381
381
|
'container_type': 'project',
|
|
382
|
+
'parent_path': None,
|
|
383
|
+
'parent': None,
|
|
382
384
|
}
|
|
383
385
|
current_identity = {
|
|
384
386
|
'username': 'test',
|
|
@@ -396,6 +398,8 @@ class TestFilePermissions:
|
|
|
396
398
|
'zone': 'core',
|
|
397
399
|
'container_code': 'test_project',
|
|
398
400
|
'container_type': 'project',
|
|
401
|
+
'parent_path': None,
|
|
402
|
+
'parent': None,
|
|
399
403
|
}
|
|
400
404
|
current_identity = {
|
|
401
405
|
'username': 'test',
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{pilot-platform-common-0.7.2 → pilot-platform-common-0.7.3}/common/jwt_handler/JWTHandler.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
|
{pilot-platform-common-0.7.2 → pilot-platform-common-0.7.3}/common/models/config_center_policy.py
RENAMED
|
File without changes
|
{pilot-platform-common-0.7.2 → pilot-platform-common-0.7.3}/common/models/service_id_generator.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{pilot-platform-common-0.7.2 → pilot-platform-common-0.7.3}/common/permissions/exceptions.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{pilot-platform-common-0.7.2 → pilot-platform-common-0.7.3}/common/project/project_client.py
RENAMED
|
File without changes
|
{pilot-platform-common-0.7.2 → pilot-platform-common-0.7.3}/common/project/project_exceptions.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
|
{pilot-platform-common-0.7.2 → pilot-platform-common-0.7.3}/tests/permissions/test_auth_client.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
|