We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 06c7dd8 commit 6425726Copy full SHA for 6425726
minio/minioadmin.py
@@ -847,8 +847,21 @@ def _attach_detach_policy(
847
"POST",
848
command,
849
body=encrypt(body, self._provider.retrieve().secret_key),
850
+ preload_content=False,
851
)
- return response.data.decode()
852
+ if (
853
+ command in [
854
+ _COMMAND.IDP_BUILTIN_POLICY_ATTACH,
855
+ _COMMAND.IDP_BUILTIN_POLICY_DETACH,
856
+ ] and
857
+ response.status in [201, 204]
858
+ ):
859
+ # Older MinIO servers do not return response.
860
+ response.close()
861
+ response.release_conn()
862
+ return ""
863
+ data = decrypt(response, self._provider.retrieve().secret_key)
864
+ return data.decode()
865
raise ValueError("either user or group must be set")
866
867
def attach_policy_ldap(
0 commit comments