Skip to content

Commit b589beb

Browse files
committed
PATCH: Bcf group permissions (#911)
* Add model, filter list views * wip: permissions * remove useless config * Comment permission implementation * bcf permissions * more tests, more view filters * add more tests * add comment about permissions
1 parent e4243b3 commit b589beb

23 files changed

+96
-48
lines changed

bimdata_api_client/api/collaboration_api.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8940,7 +8940,7 @@ def create_document(
89408940
):
89418941
"""Create a document # noqa: E501
89428942

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

bimdata_api_client/model/document_text.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -58,9 +58,9 @@ class DocumentText(ModelNormal):
5858
allowed_values = {
5959
('language',): {
6060
'None': None,
61-
'GERMAN': "german",
6261
'FRENCH': "french",
6362
'SPANISH': "spanish",
63+
'GERMAN': "german",
6464
'ITALIAN': "italian",
6565
'ENGLISH': "english",
6666
'NULL': "null",
@@ -153,7 +153,7 @@ def _from_openapi_data(cls, id, *args, **kwargs): # noqa: E501
153153
through its discriminator because we passed in
154154
_visited_composed_classes = (Animal,)
155155
text (str, none_type): The full text representation of a document if the feature is enabled and the file format supported. [optional] # noqa: E501
156-
language (str, none_type): * `german` - german * `french` - french * `spanish` - spanish * `italian` - italian * `english` - english. [optional] # noqa: E501
156+
language (str, none_type): * `french` - french * `spanish` - spanish * `german` - german * `italian` - italian * `english` - english. [optional] # noqa: E501
157157
"""
158158

159159
_check_type = kwargs.pop('_check_type', True)
@@ -237,7 +237,7 @@ def __init__(self, *args, **kwargs): # noqa: E501
237237
through its discriminator because we passed in
238238
_visited_composed_classes = (Animal,)
239239
text (str, none_type): The full text representation of a document if the feature is enabled and the file format supported. [optional] # noqa: E501
240-
language (str, none_type): * `german` - german * `french` - french * `spanish` - spanish * `italian` - italian * `english` - english. [optional] # noqa: E501
240+
language (str, none_type): * `french` - french * `spanish` - spanish * `german` - german * `italian` - italian * `english` - english. [optional] # noqa: E501
241241
"""
242242

243243
_check_type = kwargs.pop('_check_type', True)

bimdata_api_client/model/full_topic.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,7 @@ def openapi_types():
128128
'comments': ([Comment],), # noqa: E501
129129
'viewpoints': ([Viewpoint],), # noqa: E501
130130
'bimdata_viewer_layout': (bool, date, datetime, dict, float, int, list, str, none_type,), # noqa: E501
131+
'groups': ([int],), # noqa: E501
131132
}
132133

133134
@cached_property
@@ -158,6 +159,7 @@ def discriminator():
158159
'comments': 'comments', # noqa: E501
159160
'viewpoints': 'viewpoints', # noqa: E501
160161
'bimdata_viewer_layout': 'bimdata_viewer_layout', # noqa: E501
162+
'groups': 'groups', # noqa: E501
161163
}
162164

163165
read_only_vars = {
@@ -226,6 +228,7 @@ def _from_openapi_data(cls, modified_date, title, *args, **kwargs): # noqa: E50
226228
comments ([Comment]): [optional] # noqa: E501
227229
viewpoints ([Viewpoint]): [optional] # noqa: E501
228230
bimdata_viewer_layout (bool, date, datetime, dict, float, int, list, str, none_type): Non standard field. JSON describing bimdataViewerLayout.. [optional] # noqa: E501
231+
groups ([int]): [optional] # noqa: E501
229232
"""
230233

231234
_check_type = kwargs.pop('_check_type', True)
@@ -331,6 +334,7 @@ def __init__(self, title, *args, **kwargs): # noqa: E501
331334
comments ([Comment]): [optional] # noqa: E501
332335
viewpoints ([Viewpoint]): [optional] # noqa: E501
333336
bimdata_viewer_layout (bool, date, datetime, dict, float, int, list, str, none_type): Non standard field. JSON describing bimdataViewerLayout.. [optional] # noqa: E501
337+
groups ([int]): [optional] # noqa: E501
334338
"""
335339

336340
_check_type = kwargs.pop('_check_type', True)

bimdata_api_client/model/full_topic_request.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,7 @@ def openapi_types():
143143
'comments': ([CommentRequest],), # noqa: E501
144144
'viewpoints': ([ViewpointRequest],), # noqa: E501
145145
'bimdata_viewer_layout': (bool, date, datetime, dict, float, int, list, str, none_type,), # noqa: E501
146+
'groups': ([int],), # noqa: E501
146147
}
147148

148149
@cached_property
@@ -172,6 +173,7 @@ def discriminator():
172173
'comments': 'comments', # noqa: E501
173174
'viewpoints': 'viewpoints', # noqa: E501
174175
'bimdata_viewer_layout': 'bimdata_viewer_layout', # noqa: E501
176+
'groups': 'groups', # noqa: E501
175177
}
176178

177179
read_only_vars = {
@@ -238,6 +240,7 @@ def _from_openapi_data(cls, title, *args, **kwargs): # noqa: E501
238240
comments ([CommentRequest]): [optional] # noqa: E501
239241
viewpoints ([ViewpointRequest]): [optional] # noqa: E501
240242
bimdata_viewer_layout (bool, date, datetime, dict, float, int, list, str, none_type): Non standard field. JSON describing bimdataViewerLayout.. [optional] # noqa: E501
243+
groups ([int]): [optional] # noqa: E501
241244
"""
242245

243246
_check_type = kwargs.pop('_check_type', True)
@@ -343,6 +346,7 @@ def __init__(self, title, *args, **kwargs): # noqa: E501
343346
comments ([CommentRequest]): [optional] # noqa: E501
344347
viewpoints ([ViewpointRequest]): [optional] # noqa: E501
345348
bimdata_viewer_layout (bool, date, datetime, dict, float, int, list, str, none_type): Non standard field. JSON describing bimdataViewerLayout.. [optional] # noqa: E501
349+
groups ([int]): [optional] # noqa: E501
346350
"""
347351

348352
_check_type = kwargs.pop('_check_type', True)

bimdata_api_client/model/patched_document_text_request.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -58,9 +58,9 @@ class PatchedDocumentTextRequest(ModelNormal):
5858
allowed_values = {
5959
('language',): {
6060
'None': None,
61-
'GERMAN': "german",
6261
'FRENCH': "french",
6362
'SPANISH': "spanish",
63+
'GERMAN': "german",
6464
'ITALIAN': "italian",
6565
'ENGLISH': "english",
6666
'NULL': "null",
@@ -147,7 +147,7 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501
147147
through its discriminator because we passed in
148148
_visited_composed_classes = (Animal,)
149149
text (str, none_type): The full text representation of a document if the feature is enabled and the file format supported. [optional] # noqa: E501
150-
language (str, none_type): * `german` - german * `french` - french * `spanish` - spanish * `italian` - italian * `english` - english. [optional] # noqa: E501
150+
language (str, none_type): * `french` - french * `spanish` - spanish * `german` - german * `italian` - italian * `english` - english. [optional] # noqa: E501
151151
"""
152152

153153
_check_type = kwargs.pop('_check_type', True)
@@ -230,7 +230,7 @@ def __init__(self, *args, **kwargs): # noqa: E501
230230
through its discriminator because we passed in
231231
_visited_composed_classes = (Animal,)
232232
text (str, none_type): The full text representation of a document if the feature is enabled and the file format supported. [optional] # noqa: E501
233-
language (str, none_type): * `german` - german * `french` - french * `spanish` - spanish * `italian` - italian * `english` - english. [optional] # noqa: E501
233+
language (str, none_type): * `french` - french * `spanish` - spanish * `german` - german * `italian` - italian * `english` - english. [optional] # noqa: E501
234234
"""
235235

236236
_check_type = kwargs.pop('_check_type', True)

bimdata_api_client/model/patched_full_topic_request.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,7 @@ def openapi_types():
143143
'comments': ([CommentRequest],), # noqa: E501
144144
'viewpoints': ([ViewpointRequest],), # noqa: E501
145145
'bimdata_viewer_layout': (bool, date, datetime, dict, float, int, list, str, none_type,), # noqa: E501
146+
'groups': ([int],), # noqa: E501
146147
}
147148

148149
@cached_property
@@ -172,6 +173,7 @@ def discriminator():
172173
'comments': 'comments', # noqa: E501
173174
'viewpoints': 'viewpoints', # noqa: E501
174175
'bimdata_viewer_layout': 'bimdata_viewer_layout', # noqa: E501
176+
'groups': 'groups', # noqa: E501
175177
}
176178

177179
read_only_vars = {
@@ -236,6 +238,7 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501
236238
comments ([CommentRequest]): [optional] # noqa: E501
237239
viewpoints ([ViewpointRequest]): [optional] # noqa: E501
238240
bimdata_viewer_layout (bool, date, datetime, dict, float, int, list, str, none_type): Non standard field. JSON describing bimdataViewerLayout.. [optional] # noqa: E501
241+
groups ([int]): [optional] # noqa: E501
239242
"""
240243

241244
_check_type = kwargs.pop('_check_type', True)
@@ -338,6 +341,7 @@ def __init__(self, *args, **kwargs): # noqa: E501
338341
comments ([CommentRequest]): [optional] # noqa: E501
339342
viewpoints ([ViewpointRequest]): [optional] # noqa: E501
340343
bimdata_viewer_layout (bool, date, datetime, dict, float, int, list, str, none_type): Non standard field. JSON describing bimdataViewerLayout.. [optional] # noqa: E501
344+
groups ([int]): [optional] # noqa: E501
341345
"""
342346

343347
_check_type = kwargs.pop('_check_type', True)

bimdata_api_client/model/patched_topic_request.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,7 @@ def openapi_types():
133133
'format': (str,), # noqa: E501
134134
'index': (int, none_type,), # noqa: E501
135135
'bimdata_viewer_layout': (bool, date, datetime, dict, float, int, list, str, none_type,), # noqa: E501
136+
'groups': ([int],), # noqa: E501
136137
}
137138

138139
@cached_property
@@ -160,6 +161,7 @@ def discriminator():
160161
'format': 'format', # noqa: E501
161162
'index': 'index', # noqa: E501
162163
'bimdata_viewer_layout': 'bimdata_viewer_layout', # noqa: E501
164+
'groups': 'groups', # noqa: E501
163165
}
164166

165167
read_only_vars = {
@@ -222,6 +224,7 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501
222224
format (str): The BCF data structure may be used for other purposes than BCF Topics. (Storing coordinates, a viewpoint, a list of objecs, etc) The default value is \"standard\". If you want to use the BCF routes to store custom data not related to a BCF Topic, you must set this value to something else. You must add a query string filter if you want to fetch topics with a non \"standard\" format. . [optional] # noqa: E501
223225
index (int, none_type): [optional] # noqa: E501
224226
bimdata_viewer_layout (bool, date, datetime, dict, float, int, list, str, none_type): Non standard field. JSON describing bimdataViewerLayout.. [optional] # noqa: E501
227+
groups ([int]): [optional] # noqa: E501
225228
"""
226229

227230
_check_type = kwargs.pop('_check_type', True)
@@ -322,6 +325,7 @@ def __init__(self, *args, **kwargs): # noqa: E501
322325
format (str): The BCF data structure may be used for other purposes than BCF Topics. (Storing coordinates, a viewpoint, a list of objecs, etc) The default value is \"standard\". If you want to use the BCF routes to store custom data not related to a BCF Topic, you must set this value to something else. You must add a query string filter if you want to fetch topics with a non \"standard\" format. . [optional] # noqa: E501
323326
index (int, none_type): [optional] # noqa: E501
324327
bimdata_viewer_layout (bool, date, datetime, dict, float, int, list, str, none_type): Non standard field. JSON describing bimdataViewerLayout.. [optional] # noqa: E501
328+
groups ([int]): [optional] # noqa: E501
325329
"""
326330

327331
_check_type = kwargs.pop('_check_type', True)

bimdata_api_client/model/topic.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,7 @@ def openapi_types():
118118
'format': (str,), # noqa: E501
119119
'index': (int, none_type,), # noqa: E501
120120
'bimdata_viewer_layout': (bool, date, datetime, dict, float, int, list, str, none_type,), # noqa: E501
121+
'groups': ([int],), # noqa: E501
121122
}
122123

123124
@cached_property
@@ -146,6 +147,7 @@ def discriminator():
146147
'format': 'format', # noqa: E501
147148
'index': 'index', # noqa: E501
148149
'bimdata_viewer_layout': 'bimdata_viewer_layout', # noqa: E501
150+
'groups': 'groups', # noqa: E501
149151
}
150152

151153
read_only_vars = {
@@ -212,6 +214,7 @@ def _from_openapi_data(cls, title, modified_date, *args, **kwargs): # noqa: E50
212214
format (str): The BCF data structure may be used for other purposes than BCF Topics. (Storing coordinates, a viewpoint, a list of objecs, etc) The default value is \"standard\". If you want to use the BCF routes to store custom data not related to a BCF Topic, you must set this value to something else. You must add a query string filter if you want to fetch topics with a non \"standard\" format. . [optional] # noqa: E501
213215
index (int, none_type): [optional] # noqa: E501
214216
bimdata_viewer_layout (bool, date, datetime, dict, float, int, list, str, none_type): Non standard field. JSON describing bimdataViewerLayout.. [optional] # noqa: E501
217+
groups ([int]): [optional] # noqa: E501
215218
"""
216219

217220
_check_type = kwargs.pop('_check_type', True)
@@ -315,6 +318,7 @@ def __init__(self, title, *args, **kwargs): # noqa: E501
315318
format (str): The BCF data structure may be used for other purposes than BCF Topics. (Storing coordinates, a viewpoint, a list of objecs, etc) The default value is \"standard\". If you want to use the BCF routes to store custom data not related to a BCF Topic, you must set this value to something else. You must add a query string filter if you want to fetch topics with a non \"standard\" format. . [optional] # noqa: E501
316319
index (int, none_type): [optional] # noqa: E501
317320
bimdata_viewer_layout (bool, date, datetime, dict, float, int, list, str, none_type): Non standard field. JSON describing bimdataViewerLayout.. [optional] # noqa: E501
321+
groups ([int]): [optional] # noqa: E501
318322
"""
319323

320324
_check_type = kwargs.pop('_check_type', True)

bimdata_api_client/model/topic_request.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,7 @@ def openapi_types():
133133
'format': (str,), # noqa: E501
134134
'index': (int, none_type,), # noqa: E501
135135
'bimdata_viewer_layout': (bool, date, datetime, dict, float, int, list, str, none_type,), # noqa: E501
136+
'groups': ([int],), # noqa: E501
136137
}
137138

138139
@cached_property
@@ -160,6 +161,7 @@ def discriminator():
160161
'format': 'format', # noqa: E501
161162
'index': 'index', # noqa: E501
162163
'bimdata_viewer_layout': 'bimdata_viewer_layout', # noqa: E501
164+
'groups': 'groups', # noqa: E501
163165
}
164166

165167
read_only_vars = {
@@ -224,6 +226,7 @@ def _from_openapi_data(cls, title, *args, **kwargs): # noqa: E501
224226
format (str): The BCF data structure may be used for other purposes than BCF Topics. (Storing coordinates, a viewpoint, a list of objecs, etc) The default value is \"standard\". If you want to use the BCF routes to store custom data not related to a BCF Topic, you must set this value to something else. You must add a query string filter if you want to fetch topics with a non \"standard\" format. . [optional] # noqa: E501
225227
index (int, none_type): [optional] # noqa: E501
226228
bimdata_viewer_layout (bool, date, datetime, dict, float, int, list, str, none_type): Non standard field. JSON describing bimdataViewerLayout.. [optional] # noqa: E501
229+
groups ([int]): [optional] # noqa: E501
227230
"""
228231

229232
_check_type = kwargs.pop('_check_type', True)
@@ -327,6 +330,7 @@ def __init__(self, title, *args, **kwargs): # noqa: E501
327330
format (str): The BCF data structure may be used for other purposes than BCF Topics. (Storing coordinates, a viewpoint, a list of objecs, etc) The default value is \"standard\". If you want to use the BCF routes to store custom data not related to a BCF Topic, you must set this value to something else. You must add a query string filter if you want to fetch topics with a non \"standard\" format. . [optional] # noqa: E501
328331
index (int, none_type): [optional] # noqa: E501
329332
bimdata_viewer_layout (bool, date, datetime, dict, float, int, list, str, none_type): Non standard field. JSON describing bimdataViewerLayout.. [optional] # noqa: E501
333+
groups ([int]): [optional] # noqa: E501
330334
"""
331335

332336
_check_type = kwargs.pop('_check_type', True)

0 commit comments

Comments
 (0)