Kaynağa Gözat

[sentry] Do not show impersonation with Solr

Romain Rigaux 9 yıl önce
ebeveyn
işleme
556430bd94

+ 1 - 0
apps/security/src/security/templates/sentry.mako

@@ -73,6 +73,7 @@ ${ layout.menubar(section=component) }
     <!-- /ko -->
     <!-- ko if: $root.component() == 'solr' -->
       <span data-bind="text: ko.mapping.toJSON($data)"></span>
+      <br/>
       <input type="text" data-bind="hivechooser: $data.path, enable: privilegeType() == 'db'" placeholder="dbName.tableName <CTRL+SPACE>">
       <select data-bind="options: $root.availableActions, value: $data.action, enable: (privilegeType() == 'db')" style="width: 100px; margin-bottom: 0"></select>
     <!-- /ko -->

+ 1 - 1
apps/security/src/security/views.py

@@ -50,7 +50,7 @@ def _sentry(request, component):
           'sentry_provider': get_hive_sentry_provider(),
           'is_sentry_admin': request.user.groups.filter(name__in=get_sentry_server_admin_groups()).exists()
       }),
-      'has_impersonation_perm': _has_impersonation_perm(request.user),
+      'has_impersonation_perm': _has_impersonation_perm(request.user) and component == 'hive',
       'component': component
   })