Explorar o código

HUE-3929 [sentry] Fix role filtering for solr

Romain Rigaux %!s(int64=9) %!d(string=hai) anos
pai
achega
fb85538
Modificáronse 1 ficheiros con 4 adicións e 4 borrados
  1. 4 4
      apps/security/src/security/static/security/js/sentry.ko.js

+ 4 - 4
apps/security/src/security/static/security/js/sentry.ko.js

@@ -893,10 +893,10 @@ var SentryViewModel = function (initial) {
         });
         var _inPrivileges = false;
         role.privileges().forEach(function (priv) {
-          if (priv.dbName().toLowerCase().indexOf(_filter) > -1 || priv.tableName().toLowerCase().indexOf(_filter) > -1
-              || priv.URI().toLowerCase().indexOf(_filter) > -1
-              || priv.action().toLowerCase().indexOf(_filter) > -1
-              || priv.serverName().toLowerCase().indexOf(_filter) > -1) {
+          var matches = $.grep(priv.authorizables(), function(auth) {
+            return auth.name_().toLowerCase().indexOf(_filter) > -1;
+          });
+          if (matches.length > 0 || priv.action().toLowerCase().indexOf(_filter) > -1) {
             _inPrivileges = true;
           }
         });