Initial version of protected branches (#776)

- Able to restrict force push and deletion
- Able to restrict direct push
This commit is contained in:
Unknwon
2017-02-17 15:10:50 -05:00
parent dab768212a
commit 7e09d210ba
26 changed files with 528 additions and 107 deletions

View File

@@ -341,6 +341,18 @@ function initRepository() {
});
}
// Branches
if ($('.repository.settings.branches').length > 0) {
initFilterSearchDropdown('.protected-branches .dropdown');
$('.enable-protection').change(function () {
if (this.checked) {
$($(this).data('target')).removeClass('disabled');
} else {
$($(this).data('target')).addClass('disabled');
}
});
}
// Labels
if ($('.repository.labels').length > 0) {
// Create label