Skip to content
This repository was archived by the owner on Nov 18, 2025. It is now read-only.

Commit 9c9f2a5

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 a3ac8b7 commit 9c9f2a5

19 files changed

+207
-159
lines changed

.openapi-generator/FILES

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,6 @@ docs/Extensions.md
4949
docs/Feature.md
5050
docs/FeatureRequest.md
5151
docs/Folder.md
52-
docs/FolderGroupPermission.md
53-
docs/FolderGroupPermissionRequest.md
5452
docs/FolderTree.md
5553
docs/FolderUserProject.md
5654
docs/FolderWithoutChildren.md
@@ -59,6 +57,7 @@ docs/FullTopic.md
5957
docs/FullTopicRequest.md
6058
docs/Group.md
6159
docs/GroupFolder.md
60+
docs/GroupFolderRead.md
6261
docs/GroupRequest.md
6362
docs/IfcAccessToken.md
6463
docs/IfcAccessTokenRequest.md
@@ -313,8 +312,6 @@ src/model/Extensions.js
313312
src/model/Feature.js
314313
src/model/FeatureRequest.js
315314
src/model/Folder.js
316-
src/model/FolderGroupPermission.js
317-
src/model/FolderGroupPermissionRequest.js
318315
src/model/FolderTree.js
319316
src/model/FolderUserProject.js
320317
src/model/FolderWithoutChildren.js
@@ -323,6 +320,7 @@ src/model/FullTopic.js
323320
src/model/FullTopicRequest.js
324321
src/model/Group.js
325322
src/model/GroupFolder.js
323+
src/model/GroupFolderRead.js
326324
src/model/GroupRequest.js
327325
src/model/IfcAccessToken.js
328326
src/model/IfcAccessTokenRequest.js
@@ -569,8 +567,6 @@ test/model/Extensions.spec.js
569567
test/model/Feature.spec.js
570568
test/model/FeatureRequest.spec.js
571569
test/model/Folder.spec.js
572-
test/model/FolderGroupPermission.spec.js
573-
test/model/FolderGroupPermissionRequest.spec.js
574570
test/model/FolderTree.spec.js
575571
test/model/FolderUserProject.spec.js
576572
test/model/FolderWithoutChildren.spec.js
@@ -579,6 +575,7 @@ test/model/FullTopic.spec.js
579575
test/model/FullTopicRequest.spec.js
580576
test/model/Group.spec.js
581577
test/model/GroupFolder.spec.js
578+
test/model/GroupFolderRead.spec.js
582579
test/model/GroupRequest.spec.js
583580
test/model/IfcAccessToken.spec.js
584581
test/model/IfcAccessTokenRequest.spec.js

README.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -325,7 +325,7 @@ Class | Method | HTTP request | Description
325325
*bimdata.CollaborationApi* | [**updateCloudUser**](docs/CollaborationApi.md#updateCloudUser) | **PATCH** /cloud/{cloud_pk}/user/{id} | Change the user role in the cloud
326326
*bimdata.CollaborationApi* | [**updateDocument**](docs/CollaborationApi.md#updateDocument) | **PATCH** /cloud/{cloud_pk}/project/{project_pk}/document/{id} | Update some fields of the document
327327
*bimdata.CollaborationApi* | [**updateFolder**](docs/CollaborationApi.md#updateFolder) | **PATCH** /cloud/{cloud_pk}/project/{project_pk}/folder/{id} | Update some fields of a folder
328-
*bimdata.CollaborationApi* | [**updateGroupFolder**](docs/CollaborationApi.md#updateGroupFolder) | **PATCH** /cloud/{cloud_pk}/project/{project_pk}/folder/{folder_pk}/group/{id} | Update the permission of a group on a folder
328+
*bimdata.CollaborationApi* | [**updateGroupFolder**](docs/CollaborationApi.md#updateGroupFolder) | **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.
329329
*bimdata.CollaborationApi* | [**updateManageGroup**](docs/CollaborationApi.md#updateManageGroup) | **PATCH** /cloud/{cloud_pk}/project/{project_pk}/group/{id} | Update some fields of a group
330330
*bimdata.CollaborationApi* | [**updateProject**](docs/CollaborationApi.md#updateProject) | **PATCH** /cloud/{cloud_pk}/project/{id} | Update some fields of a project
331331
*bimdata.CollaborationApi* | [**updateProjectAccessToken**](docs/CollaborationApi.md#updateProjectAccessToken) | **PATCH** /cloud/{cloud_pk}/project/{project_pk}/access-token/{token} | Update some fields of a token
@@ -696,8 +696,6 @@ Class | Method | HTTP request | Description
696696
- [bimdata.Feature](docs/Feature.md)
697697
- [bimdata.FeatureRequest](docs/FeatureRequest.md)
698698
- [bimdata.Folder](docs/Folder.md)
699-
- [bimdata.FolderGroupPermission](docs/FolderGroupPermission.md)
700-
- [bimdata.FolderGroupPermissionRequest](docs/FolderGroupPermissionRequest.md)
701699
- [bimdata.FolderTree](docs/FolderTree.md)
702700
- [bimdata.FolderUserProject](docs/FolderUserProject.md)
703701
- [bimdata.FolderWithoutChildren](docs/FolderWithoutChildren.md)
@@ -706,6 +704,7 @@ Class | Method | HTTP request | Description
706704
- [bimdata.FullTopicRequest](docs/FullTopicRequest.md)
707705
- [bimdata.Group](docs/Group.md)
708706
- [bimdata.GroupFolder](docs/GroupFolder.md)
707+
- [bimdata.GroupFolderRead](docs/GroupFolderRead.md)
709708
- [bimdata.GroupRequest](docs/GroupRequest.md)
710709
- [bimdata.IfcAccessToken](docs/IfcAccessToken.md)
711710
- [bimdata.IfcAccessTokenRequest](docs/IfcAccessTokenRequest.md)

docs/CollaborationApi.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ Method | HTTP request | Description
101101
[**updateCloudUser**](CollaborationApi.md#updateCloudUser) | **PATCH** /cloud/{cloud_pk}/user/{id} | Change the user role in the cloud
102102
[**updateDocument**](CollaborationApi.md#updateDocument) | **PATCH** /cloud/{cloud_pk}/project/{project_pk}/document/{id} | Update some fields of the document
103103
[**updateFolder**](CollaborationApi.md#updateFolder) | **PATCH** /cloud/{cloud_pk}/project/{project_pk}/folder/{id} | Update some fields of a folder
104-
[**updateGroupFolder**](CollaborationApi.md#updateGroupFolder) | **PATCH** /cloud/{cloud_pk}/project/{project_pk}/folder/{folder_pk}/group/{id} | Update the permission of a group on a folder
104+
[**updateGroupFolder**](CollaborationApi.md#updateGroupFolder) | **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.
105105
[**updateManageGroup**](CollaborationApi.md#updateManageGroup) | **PATCH** /cloud/{cloud_pk}/project/{project_pk}/group/{id} | Update some fields of a group
106106
[**updateProject**](CollaborationApi.md#updateProject) | **PATCH** /cloud/{cloud_pk}/project/{id} | Update some fields of a project
107107
[**updateProjectAccessToken**](CollaborationApi.md#updateProjectAccessToken) | **PATCH** /cloud/{cloud_pk}/project/{project_pk}/access-token/{token} | Update some fields of a token
@@ -954,7 +954,7 @@ Name | Type | Description | Notes
954954
955955
Create a document
956956

957-
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
957+
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
958958

959959
### Example
960960

@@ -6341,7 +6341,7 @@ Name | Type | Description | Notes
63416341
63426342
Update some fields of a folder
63436343

6344-
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
6344+
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
63456345

63466346
### Example
63476347

@@ -6408,9 +6408,9 @@ Name | Type | Description | Notes
64086408

64096409
> GroupFolder updateGroupFolder(cloudPk, folderPk, id, projectPk, opts)
64106410
6411-
Update the permission of a group on a folder
6411+
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.
64126412

6413-
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
6413+
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
64146414

64156415
### Example
64166416

docs/Folder.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ Name | Type | Description | Notes
1212
**createdAt** | **Date** | Creation date | [readonly]
1313
**updatedAt** | **Date** | Date of the last update | [readonly]
1414
**createdBy** | [**ShortUser**](ShortUser.md) | | [readonly]
15-
**groupsPermissions** | [**[FolderGroupPermission]**](FolderGroupPermission.md) | | [readonly]
15+
**groupsPermissions** | [**[GroupFolderRead]**](GroupFolderRead.md) | List of group permissions | [readonly]
1616
**defaultPermission** | **Number** | Permission for a Folder | [optional]
1717
**userPermission** | **Number** | Aggregate of group user permissions and folder default permission | [readonly]
1818
**children** | [**[RecursiveFolderChildren]**](RecursiveFolderChildren.md) | | [readonly]

docs/FolderGroupPermissionRequest.md

Lines changed: 0 additions & 23 deletions
This file was deleted.

docs/FolderWithoutChildren.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ Name | Type | Description | Notes
1212
**createdAt** | **Date** | Creation date | [readonly]
1313
**updatedAt** | **Date** | Date of the last update | [readonly]
1414
**createdBy** | [**ShortUser**](ShortUser.md) | | [readonly]
15-
**groupsPermissions** | [**[FolderGroupPermission]**](FolderGroupPermission.md) | | [readonly]
15+
**groupsPermissions** | [**[GroupFolderRead]**](GroupFolderRead.md) | List of group permissions | [readonly]
1616
**defaultPermission** | **Number** | Permission for a Folder | [optional]
1717
**userPermission** | **Number** | Aggregate of group user permissions and folder default permission | [readonly]
1818

docs/GroupFolder.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ Name | Type | Description | Notes
66
------------ | ------------- | ------------- | -------------
77
**folder** | [**FolderWithoutChildren**](FolderWithoutChildren.md) | | [readonly]
88
**group** | [**Group**](Group.md) | | [readonly]
9-
**permission** | **Number** | Group's permission for a folder | [optional]
9+
**permission** | **Number** | |
1010

1111

1212

@@ -19,6 +19,8 @@ Name | Type | Description | Notes
1919

2020
* `100` (value: `100`)
2121

22+
* `null` (value: `null`)
23+
2224

2325

2426

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
# bimdata.FolderGroupPermission
1+
# bimdata.GroupFolderRead
22

33
## Properties
44

55
Name | Type | Description | Notes
66
------------ | ------------- | ------------- | -------------
77
**group** | [**Group**](Group.md) | |
8-
**permission** | **Number** | Group's permission for a folder | [optional]
8+
**permission** | **Number** | |
99

1010

1111

@@ -18,6 +18,8 @@ Name | Type | Description | Notes
1818

1919
* `100` (value: `100`)
2020

21+
* `null` (value: `null`)
22+
2123

2224

2325

docs/PatchedGroupFolderRequest.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@
44

55
Name | Type | Description | Notes
66
------------ | ------------- | ------------- | -------------
7-
**permission** | **Number** | Group's permission for a folder | [optional]
7+
**permission** | **Number** | | [optional]
8+
**propagate** | **Boolean** | | [optional] [default to false]
89

910

1011

@@ -17,6 +18,8 @@ Name | Type | Description | Notes
1718

1819
* `100` (value: `100`)
1920

21+
* `null` (value: `null`)
22+
2023

2124

2225

src/api/CollaborationApi.js

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -857,7 +857,7 @@ export default class CollaborationApi {
857857

858858
/**
859859
* Create a document
860-
* 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
860+
* 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
861861
* @param {Number} cloudPk A unique integer value identifying this cloud.
862862
* @param {Number} projectPk A unique integer value identifying this project.
863863
* @param {String} name Shown name of the file
@@ -925,7 +925,7 @@ export default class CollaborationApi {
925925

926926
/**
927927
* Create a document
928-
* 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
928+
* 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
929929
* @param {Number} cloudPk A unique integer value identifying this cloud.
930930
* @param {Number} projectPk A unique integer value identifying this project.
931931
* @param {String} name Shown name of the file
@@ -5868,7 +5868,7 @@ export default class CollaborationApi {
58685868

58695869
/**
58705870
* Update some fields of a folder
5871-
* 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
5871+
* 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
58725872
* @param {Number} cloudPk A unique integer value identifying this cloud.
58735873
* @param {Number} id A unique integer value identifying this folder.
58745874
* @param {Number} projectPk A unique integer value identifying this project.
@@ -5917,7 +5917,7 @@ export default class CollaborationApi {
59175917

59185918
/**
59195919
* Update some fields of a folder
5920-
* 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
5920+
* 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
59215921
* @param {Number} cloudPk A unique integer value identifying this cloud.
59225922
* @param {Number} id A unique integer value identifying this folder.
59235923
* @param {Number} projectPk A unique integer value identifying this project.
@@ -5934,8 +5934,8 @@ export default class CollaborationApi {
59345934

59355935

59365936
/**
5937-
* Update the permission of a group on a folder
5938-
* 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
5937+
* 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.
5938+
* 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
59395939
* @param {Number} cloudPk A unique integer value identifying this cloud.
59405940
* @param {Number} folderPk
59415941
* @param {Number} id A unique integer value identifying this group folder.
@@ -5989,8 +5989,8 @@ export default class CollaborationApi {
59895989
}
59905990

59915991
/**
5992-
* Update the permission of a group on a folder
5993-
* 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
5992+
* 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.
5993+
* 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
59945994
* @param {Number} cloudPk A unique integer value identifying this cloud.
59955995
* @param {Number} folderPk
59965996
* @param {Number} id A unique integer value identifying this group folder.

0 commit comments

Comments
 (0)