diff options
Diffstat (limited to 'server/sonar-web/src/main/js/components/common/handlebars-extensions.js')
-rw-r--r-- | server/sonar-web/src/main/js/components/common/handlebars-extensions.js | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/server/sonar-web/src/main/js/components/common/handlebars-extensions.js b/server/sonar-web/src/main/js/components/common/handlebars-extensions.js index 557e883f087..fd1a7ddb74f 100644 --- a/server/sonar-web/src/main/js/components/common/handlebars-extensions.js +++ b/server/sonar-web/src/main/js/components/common/handlebars-extensions.js @@ -581,4 +581,9 @@ ); }); + Handlebars.registerHelper('ifCanUseFilter', function (query, options) { + var cond = window.SS.user || query.indexOf('__me__') === -1; + return cond ? options.fn(this) : options.inverse(this); + }); + })(); |