diff --git a/CHANGELOG.md b/CHANGELOG.md index 0a5d6142..f2fb713a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,11 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [2.14.0] - Unreleased + +### Added +- Option to lock/unlock namespace is now available on the settings page (#650) + ## [2.13.1] - 2025-09-16 ### Fixed diff --git a/csp/gitprojectsettings.csp b/csp/gitprojectsettings.csp index 9ed384b9..3391baae 100644 --- a/csp/gitprojectsettings.csp +++ b/csp/gitprojectsettings.csp @@ -119,6 +119,7 @@ body { } if ('settings.settingsUIReadOnly) { + do ##class(SourceControl.Git.Utils).Locked($get(%request.Data("lockNamespace",1))) for param="gitBinPath","namespaceTemp","privateKeyFile","pullEventClass","percentClassReplace", "defaultMergeBranch","environmentName","mappingsToken" { set $Property(settings,param) = $Get(%request.Data(param,1)) } @@ -215,7 +216,7 @@ body { Success! Your changes have been saved. -
+

@@ -515,6 +516,18 @@ body { +
+ +
+
+ + +
+
+
@@ -806,6 +819,19 @@ function showOutput(target) { } } +function validateForm() { + var confirmText = ""; + var lockNamespaceInitValue = #(''##class(SourceControl.Git.Utils).Locked())#; + var cbLockNamespace = document.getElementById("lockNamespace"); + if (!cbLockNamespace) return true; + if (cbLockNamespace.checked && (lockNamespaceInitValue !== 1)) { + confirmText = "Are you sure? This will lock any source-controlled items from being edited in this namespace."; + } else if (!cbLockNamespace.checked && (lockNamespaceInitValue == 1)) { + confirmText = "Are you sure? This will allow edits of source-controlled items in this namespace."; + } + return confirmText ? confirm(confirmText) : true; +} + $(function () { $('[data-toggle="tooltip"]').tooltip({ trigger: 'hover' diff --git a/module.xml b/module.xml index 8457f4e7..f330512c 100644 --- a/module.xml +++ b/module.xml @@ -3,7 +3,7 @@ git-source-control - 2.13.1 + 2.14.0 Server-side source control extension for use of Git on InterSystems platforms git source control studio vscode module