浏览代码

HUE-9623 [aws] Show S3 browser when IDBroker is enabled (#1467)

Co-authored-by: Akhil Naik <asnaik@cloudere.com>
Ying Chen 5 年之前
父节点
当前提交
575bef9cef
共有 1 个文件被更改,包括 5 次插入3 次删除
  1. 5 3
      desktop/libs/aws/src/aws/conf.py

+ 5 - 3
desktop/libs/aws/src/aws/conf.py

@@ -150,7 +150,7 @@ def get_key_expiry():
     return 86400
 
 
-HAS_IAM_DETECTION=Config(
+HAS_IAM_DETECTION = Config(
   help=_('Enable the detection of an IAM role providing the credentials automatically. It can take a few seconds.'),
   key='has_iam_detection',
   default=False,
@@ -245,7 +245,9 @@ AWS_ACCOUNTS = UnspecifiedConfigSection(
         type=coerce_bool
       ),
       KEY_EXPIRY=Config(
-        help=_('The time in seconds before a delegate key is expired. Used when filebrowser/redirect_download is used. Default to 4 Hours.'),
+        help=_(
+          'The time in seconds before a delegate key is expired. Used when filebrowser/redirect'
+          'download is used. Default to 4 Hours.'),
         key='key_expiry',
         default=14400,
         type=int
@@ -257,7 +259,7 @@ AWS_ACCOUNTS = UnspecifiedConfigSection(
 
 def is_enabled():
   return ('default' in list(AWS_ACCOUNTS.keys()) and AWS_ACCOUNTS['default'].get_raw() and AWS_ACCOUNTS['default'].ACCESS_KEY_ID.get()) or \
-      has_iam_metadata()
+      has_iam_metadata() or conf_idbroker.is_idbroker_enabled('s3a')
 
 
 def is_ec2_instance():