diff --git a/polygerrit-ui/app/elements/admin/gr-project/gr-project.html b/polygerrit-ui/app/elements/admin/gr-project/gr-project.html index aee02566da..8ba27d92aa 100644 --- a/polygerrit-ui/app/elements/admin/gr-project/gr-project.html +++ b/polygerrit-ui/app/elements/admin/gr-project/gr-project.html @@ -44,10 +44,10 @@ limitations under the License. #loading:not(.loading) { display: none; } - #noteDbSettings { + .projectSettings { display: none; } - #noteDbSettings.showNoteDb { + .projectSettings.showConfig { display: block; } @@ -157,6 +157,40 @@ limitations under the License. +
+ Enable signed push + + + + + +
+
+ Require signed push + + + + + +
Reject implicit merges when changes are pushed for review @@ -173,7 +207,7 @@ limitations under the License.
-
+
Enable adding unregistered users as reviewers and CCs on changes diff --git a/polygerrit-ui/app/elements/admin/gr-project/gr-project.js b/polygerrit-ui/app/elements/admin/gr-project/gr-project.js index b54824b79c..06d553ab76 100644 --- a/polygerrit-ui/app/elements/admin/gr-project/gr-project.js +++ b/polygerrit-ui/app/elements/admin/gr-project/gr-project.js @@ -255,8 +255,8 @@ return commands; }, - _computeNoteDbClass(noteDB) { - return noteDB ? 'showNoteDb': ''; + _computeProjectsClass(config) { + return config ? 'showConfig': ''; }, }); })(); diff --git a/polygerrit-ui/app/elements/admin/gr-project/gr-project_test.html b/polygerrit-ui/app/elements/admin/gr-project/gr-project_test.html index ce7fe805ca..4f9b098d37 100644 --- a/polygerrit-ui/app/elements/admin/gr-project/gr-project_test.html +++ b/polygerrit-ui/app/elements/admin/gr-project/gr-project_test.html @@ -73,6 +73,14 @@ limitations under the License. value: false, configured_value: 'FALSE', }, + enable_signed_push: { + value: false, + configured_value: 'FALSE', + }, + require_signed_push: { + value: false, + configured_value: 'FALSE', + }, reject_implicit_merges: { value: false, configured_value: 'FALSE', @@ -244,15 +252,16 @@ limitations under the License. }); test('fields update and save correctly', done => { + // test notedb element._noteDbEnabled = false; assert.equal( - element._computeNoteDbClass(element._noteDbEnabled), ''); + element._computeProjectsClass(element._noteDbEnabled), ''); element._noteDbEnabled = true; assert.equal( - element._computeNoteDbClass(element._noteDbEnabled), 'showNoteDb'); + element._computeProjectsClass(element._noteDbEnabled), 'showConfig'); const configInputObj = { description: 'new description', @@ -261,6 +270,8 @@ limitations under the License. use_signed_off_by: 'TRUE', create_new_change_for_all_not_in_target: 'TRUE', require_change_id: 'TRUE', + enable_signed_push: 'TRUE', + require_signed_push: 'TRUE', reject_implicit_merges: 'TRUE', private_by_default: 'TRUE', match_author_to_committer_date: 'TRUE', @@ -289,6 +300,10 @@ limitations under the License. configInputObj.create_new_change_for_all_not_in_target; element.$.requireChangeIdSelect.bindValue = configInputObj.require_change_id; + element.$.enableSignedPush.bindValue = + configInputObj.enable_signed_push; + element.$.requireSignedPush.bindValue = + configInputObj.require_signed_push; element.$.rejectImplicitMergesSelect.bindValue = configInputObj.reject_implicit_merges; element.$.setAllnewChangesPrivateByDefaultSelect.bindValue =