Skip to content

Commit cbefb44

Browse files
committed
fix #392 no longer require %SYS namespace access
1 parent 5cb0ed0 commit cbefb44

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

src/api/index.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -340,12 +340,16 @@ export class AtelierAPI {
340340
}
341341
}
342342

343+
/**
344+
* Use the serverInfo endpoint. Connection object does not need to have specified a namespace when instantiated.
345+
*/
343346
public serverInfo(): Promise<Atelier.Response<Atelier.Content<Atelier.ServerInfo>>> {
344347
return this.request(0, "GET").then((info) => {
345348
if (info && info.result && info.result.content && info.result.content.api > 0) {
346349
const data = info.result.content;
347350
const apiVersion = data.api;
348-
if (!data.namespaces.includes(this.ns.toUpperCase())) {
351+
// If this is a namespace-specific connection, throw if it doesn't exist or if the user has no access to it
352+
if (this.ns && !data.namespaces.includes(this.ns.toUpperCase())) {
349353
throw {
350354
code: "WrongNamespace",
351355
message: `This server does not have specified namespace '${this.ns}'.\n

src/commands/addServerNamespaceToWorkspace.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ export async function addServerNamespaceToWorkspace(): Promise<void> {
1717
return;
1818
}
1919
// Get its namespace list
20-
let uri = vscode.Uri.parse(`isfs://${serverName}/?ns=%SYS`);
20+
let uri = vscode.Uri.parse(`isfs://${serverName}/`);
2121
await resolveConnectionSpec(serverName);
2222
// Prepare a displayable form of its connection spec as a hint to the user
2323
const connSpec = await serverManagerApi.getServerSpec(serverName);

0 commit comments

Comments
 (0)