diff --git a/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva/search.js b/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva/search.js index b3faebc6a..aef73d32d 100644 --- a/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva/search.js +++ b/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva/search.js @@ -321,6 +321,14 @@ $(function() { } + hasSavePropertyKarma=function(){ + return hasKarma("archiva-add-metadata"); + } + + hasDeletePropertyKarma=function(){ + return hasKarma("archiva-delete-metadata"); + } + saveProperty=function(entry){ if($.trim(entry.key() ).length<1){ clearUserMessages(); diff --git a/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva/templates/search.html b/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva/templates/search.html index 19595d3f6..c0fd778a6 100644 --- a/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva/templates/search.html +++ b/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva/templates/search.html @@ -687,7 +687,9 @@
- ${$.i18n.prop('browse.artifact.metadatas.add')} + {{if hasSavePropertyKarma()}} + ${$.i18n.prop('browse.artifact.metadatas.add')} + {{/if}} @@ -755,15 +757,25 @@ {{each(i, row) itemsOnCurrentPage()}}