intersystems-community / vscode-objectscript

InterSystems ObjectScript extension for Visual Studio Code
https://docs.intersystems.com/components/csp/docbook/DocBook.UI.Page.cls?KEY=GVSCO
Other
106 stars 48 forks source link

Allow server-side file to readonly if server-side source control class for namespace returns that status #1397

Closed gjsjohnmurray closed 2 months ago

gjsjohnmurray commented 2 months ago

Some source control systems require code to be reserved/checked-out before it is changed.

Since ISFS was originally implemented VS Code's FileSystemProvider API has gained the ability for its stat method's FileStat return value to include an optional permissions property of type FilePermission. One of its bitmask values is Readonly.

I propose adding a boolean setting to make stat return permissions with the Readonly bit set or cleared depending on the value of the Editable boolean returned from the GetStatus method of the server-side source control class (if any) of the namespace.

The new setting would default to false so the new behaviour is opt-in and thus won't break existing environments.

It would be a resource-level setting so it can be configured server-side per namespace if desired.

isc-bsaviano commented 2 months ago

@gjsjohnmurray It might be a good idea to mark a class as "read-only" if it's deployed as well