Skip to content

Commit 5eca95a

Browse files
committed
PATCH: Feat/permission explicit propagate (#636)
* add delete permission route, remove signals implicit propagation * explicit propagation for permissions * remove useless tests * fix nested group folder serializer * include delete groupFolder in update route
1 parent 1851d7e commit 5eca95a

22 files changed

Lines changed: 84 additions & 416 deletions

.openapi-generator/FILES

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,6 @@ bimdata_api_client/model/extensions.py
6060
bimdata_api_client/model/feature.py
6161
bimdata_api_client/model/feature_request.py
6262
bimdata_api_client/model/folder.py
63-
bimdata_api_client/model/folder_group_permission.py
64-
bimdata_api_client/model/folder_group_permission_request.py
6563
bimdata_api_client/model/folder_tree.py
6664
bimdata_api_client/model/folder_user_project.py
6765
bimdata_api_client/model/folder_without_children.py
@@ -70,6 +68,7 @@ bimdata_api_client/model/full_topic.py
7068
bimdata_api_client/model/full_topic_request.py
7169
bimdata_api_client/model/group.py
7270
bimdata_api_client/model/group_folder.py
71+
bimdata_api_client/model/group_folder_read.py
7372
bimdata_api_client/model/group_request.py
7473
bimdata_api_client/model/ifc_access_token.py
7574
bimdata_api_client/model/ifc_access_token_request.py
@@ -315,8 +314,6 @@ docs/Extensions.md
315314
docs/Feature.md
316315
docs/FeatureRequest.md
317316
docs/Folder.md
318-
docs/FolderGroupPermission.md
319-
docs/FolderGroupPermissionRequest.md
320317
docs/FolderTree.md
321318
docs/FolderUserProject.md
322319
docs/FolderWithoutChildren.md
@@ -325,6 +322,7 @@ docs/FullTopic.md
325322
docs/FullTopicRequest.md
326323
docs/Group.md
327324
docs/GroupFolder.md
325+
docs/GroupFolderRead.md
328326
docs/GroupRequest.md
329327
docs/IfcAccessToken.md
330328
docs/IfcAccessTokenRequest.md
@@ -575,8 +573,6 @@ test/test_extensions.py
575573
test/test_feature.py
576574
test/test_feature_request.py
577575
test/test_folder.py
578-
test/test_folder_group_permission.py
579-
test/test_folder_group_permission_request.py
580576
test/test_folder_tree.py
581577
test/test_folder_user_project.py
582578
test/test_folder_without_children.py
@@ -585,6 +581,7 @@ test/test_full_topic.py
585581
test/test_full_topic_request.py
586582
test/test_group.py
587583
test/test_group_folder.py
584+
test/test_group_folder_read.py
588585
test/test_group_request.py
589586
test/test_ifc_access_token.py
590587
test/test_ifc_access_token_request.py

README.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -341,7 +341,7 @@ Class | Method | HTTP request | Description
341341
*CollaborationApi* | [**update_cloud_user**](docs/CollaborationApi.md#update_cloud_user) | **PATCH** /cloud/{cloud_pk}/user/{id} | Change the user role in the cloud
342342
*CollaborationApi* | [**update_document**](docs/CollaborationApi.md#update_document) | **PATCH** /cloud/{cloud_pk}/project/{project_pk}/document/{id} | Update some fields of the document
343343
*CollaborationApi* | [**update_folder**](docs/CollaborationApi.md#update_folder) | **PATCH** /cloud/{cloud_pk}/project/{project_pk}/folder/{id} | Update some fields of a folder
344-
*CollaborationApi* | [**update_group_folder**](docs/CollaborationApi.md#update_group_folder) | **PATCH** /cloud/{cloud_pk}/project/{project_pk}/folder/{folder_pk}/group/{id} | Update the permission of a group on a folder
344+
*CollaborationApi* | [**update_group_folder**](docs/CollaborationApi.md#update_group_folder) | **PATCH** /cloud/{cloud_pk}/project/{project_pk}/folder/{folder_pk}/group/{id} | Update the permission of a group on a folder. When propagate is set to True, the permission of all children in the folder will be updated.
345345
*CollaborationApi* | [**update_manage_group**](docs/CollaborationApi.md#update_manage_group) | **PATCH** /cloud/{cloud_pk}/project/{project_pk}/group/{id} | Update some fields of a group
346346
*CollaborationApi* | [**update_project**](docs/CollaborationApi.md#update_project) | **PATCH** /cloud/{cloud_pk}/project/{id} | Update some fields of a project
347347
*CollaborationApi* | [**update_project_access_token**](docs/CollaborationApi.md#update_project_access_token) | **PATCH** /cloud/{cloud_pk}/project/{project_pk}/access-token/{token} | Update some fields of a token
@@ -712,8 +712,6 @@ Class | Method | HTTP request | Description
712712
- [Feature](docs/Feature.md)
713713
- [FeatureRequest](docs/FeatureRequest.md)
714714
- [Folder](docs/Folder.md)
715-
- [FolderGroupPermission](docs/FolderGroupPermission.md)
716-
- [FolderGroupPermissionRequest](docs/FolderGroupPermissionRequest.md)
717715
- [FolderTree](docs/FolderTree.md)
718716
- [FolderUserProject](docs/FolderUserProject.md)
719717
- [FolderWithoutChildren](docs/FolderWithoutChildren.md)
@@ -722,6 +720,7 @@ Class | Method | HTTP request | Description
722720
- [FullTopicRequest](docs/FullTopicRequest.md)
723721
- [Group](docs/Group.md)
724722
- [GroupFolder](docs/GroupFolder.md)
723+
- [GroupFolderRead](docs/GroupFolderRead.md)
725724
- [GroupRequest](docs/GroupRequest.md)
726725
- [IfcAccessToken](docs/IfcAccessToken.md)
727726
- [IfcAccessTokenRequest](docs/IfcAccessTokenRequest.md)

bimdata_api_client/api/collaboration_api.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8240,7 +8240,7 @@ def create_document(
82408240
):
82418241
"""Create a document # noqa: E501
82428242

8243-
Create a document. If the document is one of {'DWG', 'POINT_CLOUD', 'DXF', 'OBJ', 'IFC', 'GLTF', 'DAE', 'BFX'}, a model will be created and attached to this document Required scopes: document:write # noqa: E501
8243+
Create a document. If the document is one of {'POINT_CLOUD', 'DAE', 'GLTF', 'IFC', 'OBJ', 'DWG', 'BFX', 'DXF'}, a model will be created and attached to this document Required scopes: document:write # noqa: E501
82448244
This method makes a synchronous HTTP request by default. To make an
82458245
asynchronous HTTP request, please pass async_req=True
82468246

@@ -15274,7 +15274,7 @@ def update_folder(
1527415274
):
1527515275
"""Update some fields of a folder # noqa: E501
1527615276

15277-
Update some fields of a folder. Only project admins can update the `default_permission` field. `default_permission` choices are : ``` 1: ACCESS_DENIED, 50: READ_ONLY, 100: READ_WRTIE ``` When this route is used, the permission of all children in the folder will be updated unless a child has already been updated with this route. In this case, if the updated permission is the same as the previously modified child's, the child will lose its \"independence\" and follow the parent's future permission when it is modified again. Caution: The 'default_permission' field is not applied to users belonging to one or more groups. Required scopes: document:write # noqa: E501
15277+
Update some fields of a folder. Only project admins can update the `default_permission` field. `default_permission` choices are : ``` 1: ACCESS_DENIED, 50: READ_ONLY, 100: READ_WRTIE ``` When propagate is set to True, the permission of all children in the folder will be updated. Caution: The 'default_permission' field is not applied to users belonging to one or more groups. Required scopes: document:write # noqa: E501
1527815278
This method makes a synchronous HTTP request by default. To make an
1527915279
asynchronous HTTP request, please pass async_req=True
1528015280

@@ -15360,9 +15360,9 @@ def update_group_folder(
1536015360
project_pk,
1536115361
**kwargs
1536215362
):
15363-
"""Update the permission of a group on a folder # noqa: E501
15363+
"""Update the permission of a group on a folder. When propagate is set to True, the permission of all children in the folder will be updated. # noqa: E501
1536415364

15365-
Update the permission of a group on a folder. Permissions choices are : ``` 1: ACCESS_DENIED, 50: READ_ONLY, 100: READ_WRTIE ``` When this route is used, the permission of all children in the folder will be updated unless a child has already been updated with this route. In this case, if the updated permission is the same as the previously modified child's, the child will lose its \"independence\" and follow the parent's future permission when it is modified again. Required scopes: org:manage # noqa: E501
15365+
Update the permission of a group on a folder. Permissions choices are : ``` 1: ACCESS_DENIED, 50: READ_ONLY, 100: READ_WRITE, None: Default value (See the default_permission field of the folder) ``` When propagate is set to True, the permission of all children in the folder will be updated. Required scopes: org:manage # noqa: E501
1536615366
This method makes a synchronous HTTP request by default. To make an
1536715367
asynchronous HTTP request, please pass async_req=True
1536815368

bimdata_api_client/model/folder.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,10 +31,10 @@
3131

3232

3333
def lazy_import():
34-
from bimdata_api_client.model.folder_group_permission import FolderGroupPermission
34+
from bimdata_api_client.model.group_folder_read import GroupFolderRead
3535
from bimdata_api_client.model.recursive_folder_children import RecursiveFolderChildren
3636
from bimdata_api_client.model.short_user import ShortUser
37-
globals()['FolderGroupPermission'] = FolderGroupPermission
37+
globals()['GroupFolderRead'] = GroupFolderRead
3838
globals()['RecursiveFolderChildren'] = RecursiveFolderChildren
3939
globals()['ShortUser'] = ShortUser
4040

@@ -116,7 +116,7 @@ def openapi_types():
116116
'created_at': (datetime,), # noqa: E501
117117
'updated_at': (datetime,), # noqa: E501
118118
'created_by': (bool, date, datetime, dict, float, int, list, str, none_type,), # noqa: E501
119-
'groups_permissions': ([FolderGroupPermission],), # noqa: E501
119+
'groups_permissions': ([GroupFolderRead],), # noqa: E501
120120
'user_permission': (int,), # noqa: E501
121121
'children': ([RecursiveFolderChildren],), # noqa: E501
122122
'parent_id': (int, none_type,), # noqa: E501
@@ -170,7 +170,7 @@ def _from_openapi_data(cls, id, type, nature, name, created_at, updated_at, crea
170170
created_at (datetime): Creation date
171171
updated_at (datetime): Date of the last update
172172
created_by (bool, date, datetime, dict, float, int, list, str, none_type):
173-
groups_permissions ([FolderGroupPermission]):
173+
groups_permissions ([GroupFolderRead]): List of group permissions
174174
user_permission (int): Aggregate of group user permissions and folder default permission
175175
children ([RecursiveFolderChildren]):
176176

0 commit comments

Comments
 (0)