aboutsummaryrefslogtreecommitdiffstats
path: root/sonar-server/src/main
diff options
context:
space:
mode:
authorStas Vilchik <vilchiks@gmail.com>2014-03-03 15:52:35 +0100
committerStas Vilchik <vilchiks@gmail.com>2014-03-03 15:52:35 +0100
commitdc3703f8f164648e0b6491b06c4aaa333595ea23 (patch)
tree51306168d2d1f267987348b94d7284dfead26cc2 /sonar-server/src/main
parent6a5254cbcf41f0221cfc1597d211252ac8d5d306 (diff)
downloadsonarqube-dc3703f8f164648e0b6491b06c4aaa333595ea23.tar.gz
sonarqube-dc3703f8f164648e0b6491b06c4aaa333595ea23.zip
SONAR-4366 Quality Gates: ready for the permissions stuff
Diffstat (limited to 'sonar-server/src/main')
-rw-r--r--sonar-server/src/main/webapp/javascripts/quality-gate/views/quality-gate-detail-projects-view.coffee8
-rw-r--r--sonar-server/src/main/webapp/javascripts/quality-gate/views/quality-gate-detail-projects-view.js8
2 files changed, 2 insertions, 14 deletions
diff --git a/sonar-server/src/main/webapp/javascripts/quality-gate/views/quality-gate-detail-projects-view.coffee b/sonar-server/src/main/webapp/javascripts/quality-gate/views/quality-gate-detail-projects-view.coffee
index 2bc4af08faa..0d02f0bf298 100644
--- a/sonar-server/src/main/webapp/javascripts/quality-gate/views/quality-gate-detail-projects-view.coffee
+++ b/sonar-server/src/main/webapp/javascripts/quality-gate/views/quality-gate-detail-projects-view.coffee
@@ -16,7 +16,7 @@ define [
new SelectList
el: @$('#select-list-projects')
width: '100%'
- readOnly: true
+ readOnly: !@options.app.canEdit
format: (item) -> item.name
searchUrl: "#{baseUrl}/api/qualitygates/search?gateId=#{@options.gateId}"
selectUrl: "#{baseUrl}/api/qualitygates/select"
@@ -33,9 +33,3 @@ define [
tooltips:
select: window.SS.phrases.projects.select_hint
deselect: window.SS.phrases.projects.deselect_hint
-
-
-
-
- serializeData: ->
- _.extend super, canEdit: @options.app.canEdit
diff --git a/sonar-server/src/main/webapp/javascripts/quality-gate/views/quality-gate-detail-projects-view.js b/sonar-server/src/main/webapp/javascripts/quality-gate/views/quality-gate-detail-projects-view.js
index d1cd26edf93..2da6868f81e 100644
--- a/sonar-server/src/main/webapp/javascripts/quality-gate/views/quality-gate-detail-projects-view.js
+++ b/sonar-server/src/main/webapp/javascripts/quality-gate/views/quality-gate-detail-projects-view.js
@@ -20,7 +20,7 @@
return new SelectList({
el: this.$('#select-list-projects'),
width: '100%',
- readOnly: true,
+ readOnly: !this.options.app.canEdit,
format: function(item) {
return item.name;
},
@@ -46,12 +46,6 @@
}
};
- QualityGateDetailProjectsView.prototype.serializeData = function() {
- return _.extend(QualityGateDetailProjectsView.__super__.serializeData.apply(this, arguments), {
- canEdit: this.options.app.canEdit
- });
- };
-
return QualityGateDetailProjectsView;
})(Marionette.ItemView);