ul-api-utils 9.2.3__py3-none-any.whl → 9.2.5__py3-none-any.whl
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.
Potentially problematic release.
This version of ul-api-utils might be problematic. Click here for more details.
- ul_api_utils/modules/api_sdk_jwt.py +4 -3
- {ul_api_utils-9.2.3.dist-info → ul_api_utils-9.2.5.dist-info}/METADATA +1 -1
- {ul_api_utils-9.2.3.dist-info → ul_api_utils-9.2.5.dist-info}/RECORD +7 -7
- {ul_api_utils-9.2.3.dist-info → ul_api_utils-9.2.5.dist-info}/LICENSE +0 -0
- {ul_api_utils-9.2.3.dist-info → ul_api_utils-9.2.5.dist-info}/WHEEL +0 -0
- {ul_api_utils-9.2.3.dist-info → ul_api_utils-9.2.5.dist-info}/entry_points.txt +0 -0
- {ul_api_utils-9.2.3.dist-info → ul_api_utils-9.2.5.dist-info}/top_level.txt +0 -0
|
@@ -63,7 +63,7 @@ class ApiSdkJwt(NamedTuple):
|
|
|
63
63
|
env: str
|
|
64
64
|
permissions: Set[int]
|
|
65
65
|
additional_data: Dict[str, Any]
|
|
66
|
-
is_superuser: bool = False
|
|
66
|
+
is_superuser: Optional[bool] = False
|
|
67
67
|
raw: Optional[str] = None
|
|
68
68
|
username: Optional[str] = None
|
|
69
69
|
|
|
@@ -157,7 +157,7 @@ class ApiSdkJwt(NamedTuple):
|
|
|
157
157
|
compressed_props = [k for k in data.keys() if RE_COMPRESSED_PROP.match(k) is not None]
|
|
158
158
|
|
|
159
159
|
if len(compressed_props) == 1: # COMPRESSED
|
|
160
|
-
env, _id, _user_id, _organization_id,
|
|
160
|
+
env, _id, _user_id, _organization_id, _is_superuser, _exp_date, _permissions = data.pop(compressed_props[0])
|
|
161
161
|
token_type = JWT_TYPE__UNCOMPRESSED[compressed_props[0][0]]
|
|
162
162
|
version = int(compressed_props[0][1:])
|
|
163
163
|
|
|
@@ -165,6 +165,7 @@ class ApiSdkJwt(NamedTuple):
|
|
|
165
165
|
id = cls.decompress_uuid(_id)
|
|
166
166
|
user_id = cls.decompress_uuid(_user_id)
|
|
167
167
|
organization_id = cls.decompress_uuid(_organization_id) if len(_organization_id) > 0 else None
|
|
168
|
+
is_superuser = bool(_is_superuser) if len(_is_superuser) > 0 else False
|
|
168
169
|
exp_date = datetime.fromtimestamp(JWT_EXP_DATE_TIMESTAMP_BASIS + _exp_date * 60)
|
|
169
170
|
permissions = set(sorted(cls.decompress_permissions(_permissions)))
|
|
170
171
|
else:
|
|
@@ -176,7 +177,7 @@ class ApiSdkJwt(NamedTuple):
|
|
|
176
177
|
token_type = data.pop('token_type')
|
|
177
178
|
user_id = UUID(data.pop('user_id'))
|
|
178
179
|
organization_id = UUID(data.pop('organization_id')) if data.get('organization_id', None) is not None else None
|
|
179
|
-
is_superuser = data.pop('is_superuser')
|
|
180
|
+
is_superuser = bool(data.pop('is_superuser'))
|
|
180
181
|
permissions = set(sorted(data.pop('permissions')))
|
|
181
182
|
|
|
182
183
|
if not isinstance(env, str):
|
|
@@ -67,7 +67,7 @@ ul_api_utils/internal_api/__tests__/internal_api_content_type.py,sha256=mfiYPkzK
|
|
|
67
67
|
ul_api_utils/modules/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
68
68
|
ul_api_utils/modules/api_sdk.py,sha256=0gZQN9UaWSDIlfa9GChSJtwF7xFZA9-l3etIjlgAYSI,26438
|
|
69
69
|
ul_api_utils/modules/api_sdk_config.py,sha256=ZUR48tIJeFlPJTSjyXzKfXaCKPtfqeaA0mlLX42SSFY,2137
|
|
70
|
-
ul_api_utils/modules/api_sdk_jwt.py,sha256=
|
|
70
|
+
ul_api_utils/modules/api_sdk_jwt.py,sha256=te5MZYLREDxeo1RlvWjsq7V8dW2Umj9UsNHSlEk46rc,15604
|
|
71
71
|
ul_api_utils/modules/intermediate_state.py,sha256=7ZZ3Sypbb8LaSfrVhaXaWRDnj8oyy26NUbmFK7vr-y4,1270
|
|
72
72
|
ul_api_utils/modules/worker_context.py,sha256=jGjopeuYuTtIDmsrqK7TcbTD-E81t8OWvWS1JpTC6b0,802
|
|
73
73
|
ul_api_utils/modules/worker_sdk.py,sha256=WNJ45LyxeTOJcogcL-t_P7rBVZprJKOmiVEAo-1fU3s,5153
|
|
@@ -148,9 +148,9 @@ ul_api_utils/validators/validate_empty_object.py,sha256=3Ck_iwyJE_M5e7l6s1i88aqb
|
|
|
148
148
|
ul_api_utils/validators/validate_uuid.py,sha256=EfvlRirv2EW0Z6w3s8E8rUa9GaI8qXZkBWhnPs8NFrA,257
|
|
149
149
|
ul_api_utils/validators/__tests__/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
150
150
|
ul_api_utils/validators/__tests__/test_custom_fields.py,sha256=omXI_PPefDfCehEVJxEevep8phY6aySjLnpW_usT85U,1385
|
|
151
|
-
ul_api_utils-9.2.
|
|
152
|
-
ul_api_utils-9.2.
|
|
153
|
-
ul_api_utils-9.2.
|
|
154
|
-
ul_api_utils-9.2.
|
|
155
|
-
ul_api_utils-9.2.
|
|
156
|
-
ul_api_utils-9.2.
|
|
151
|
+
ul_api_utils-9.2.5.dist-info/LICENSE,sha256=6Qo8OdcqI8aGrswJKJYhST-bYqxVQBQ3ujKdTSdq-80,1062
|
|
152
|
+
ul_api_utils-9.2.5.dist-info/METADATA,sha256=NiqVuBllDJ705cspWbfjDH5tYIDIylqZv9NJcuX2Txc,14712
|
|
153
|
+
ul_api_utils-9.2.5.dist-info/WHEEL,sha256=G16H4A3IeoQmnOrYV4ueZGKSjhipXx8zc8nu9FGlvMA,92
|
|
154
|
+
ul_api_utils-9.2.5.dist-info/entry_points.txt,sha256=8tL3ySHWTyJMuV1hx1fHfN8zumDVOCOm63w3StphkXg,53
|
|
155
|
+
ul_api_utils-9.2.5.dist-info/top_level.txt,sha256=1XsW8iOSFaH4LOzDcnNyxHpHrbKU3fSn-aIAxe04jmw,21
|
|
156
|
+
ul_api_utils-9.2.5.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|