fix: 只读/调试模式允许读取传输请求与版本(enableTransports 只控制只读传输工具族,写仍由 allowedPackages/allowTransportableEdits 拦截)

This commit is contained in:
QQ597901027
2026-10-21 10:32:46 +08:00
parent bde2d48557
commit fdd202caa1
5 changed files with 26 additions and 16 deletions
+10 -4
View File
@@ -65,8 +65,12 @@ const ROUTE_PREFIX = '/abap-adt'
*/
const MODE_POLICIES = {
'read-only': {
enableTransports: false,
allowedTransports: '__READ_ONLY_NO_TRANSPORT__',
// Transport READS stay available in read-only mode: `enableTransports`
// gates the transport tool family (adt_transports / adt_object_versions —
// both read-only tools); writes are blocked by the package sentinel below
// plus allowTransportableEdits=false.
enableTransports: true,
allowedTransports: '*',
allowTransportableEdits: false,
allowedPackages: '__READ_ONLY_NO_PACKAGE__',
allowExecution: false,
@@ -75,8 +79,10 @@ const MODE_POLICIES = {
allowDebugVariables: false,
},
debug: {
enableTransports: false,
allowedTransports: '__READ_ONLY_NO_TRANSPORT__',
// Same transport-read exception as read-only; the debugger/execution are
// what this mode adds.
enableTransports: true,
allowedTransports: '*',
allowTransportableEdits: false,
allowedPackages: '__READ_ONLY_NO_PACKAGE__',
allowExecution: true,