File tree Expand file tree Collapse file tree 2 files changed +12
-5
lines changed
src/providers/FileSystemProvider Expand file tree Collapse file tree 2 files changed +12
-5
lines changed Original file line number Diff line number Diff line change 1312
1312
"type" : " boolean" ,
1313
1313
"scope" : " resource"
1314
1314
},
1315
+ "objectscript.serverSourceControl.respectEditableStatus" : {
1316
+ "description" : " Set ISFS document readonly if GetStatus method of server-side source control class returns Editable=0" ,
1317
+ "type" : " boolean" ,
1318
+ "scope" : " resource"
1319
+ },
1315
1320
"objectscript.export" : {
1316
1321
"type" : " object" ,
1317
1322
"description" : " Control what to export from the server into the local folder." ,
Original file line number Diff line number Diff line change @@ -231,11 +231,13 @@ export class FileSystemProvider implements vscode.FileSystemProvider {
231
231
}
232
232
233
233
// Does server-side source control report it as editable?
234
- const query = "select * from %Atelier_v1_Utils.Extension_GetStatus(?)" ;
235
- const statusObj = await api . actionQuery ( query , [ serverName ] ) ;
236
- const docStatus = statusObj . result . content . pop ( ) ;
237
- if ( docStatus ) {
238
- result . permissions = docStatus . editable ? undefined : result . permissions | vscode . FilePermission . Readonly ;
234
+ if ( vscode . workspace . getConfiguration ( "objectscript.serverSourceControl" , uri ) ?. get ( "respectEditableStatus" ) ) {
235
+ const query = "select * from %Atelier_v1_Utils.Extension_GetStatus(?)" ;
236
+ const statusObj = await api . actionQuery ( query , [ serverName ] ) ;
237
+ const docStatus = statusObj . result . content . pop ( ) ;
238
+ if ( docStatus ) {
239
+ result . permissions = docStatus . editable ? undefined : result . permissions | vscode . FilePermission . Readonly ;
240
+ }
239
241
}
240
242
}
241
243
return result ;
You can’t perform that action at this time.
0 commit comments