Skip to content

Commit d903498

Browse files
committed
[WS CLI] Make env --scope=user compatible with GitLab groups
1 parent 2a5da84 commit d903498

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

components/gitpod-cli/cmd/env.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ func connectToServer(ctx context.Context, options *connectToServerOptions) (*con
149149
operations := "create/get/update/delete"
150150
if options != nil && options.setEnvScope == envScopeUser {
151151
// Updating user env vars requires a different token with a special scope
152-
repositoryPattern = "*/*"
152+
repositoryPattern = "*/**"
153153
operations = "update"
154154
}
155155

@@ -230,7 +230,7 @@ func setEnvs(ctx context.Context, setEnvScope envScope, args []string) error {
230230
if ferr, ok := err.(*jsonrpc2.Error); ok && ferr.Code == http.StatusForbidden && setEnvScope == envScopeUser {
231231
return fmt.Errorf(""+
232232
"Can't automatically create env var `%s` for security reasons.\n"+
233-
"Please create the var manually under %s/user/variables using Name=%s, Scope=*/*, Value=foobar", v.Name, result.gitpodHost, v.Name)
233+
"Please create the var manually under %s/user/variables using Name=%s, Scope=*/**, Value=foobar", v.Name, result.gitpodHost, v.Name)
234234
}
235235
return err
236236
}

components/server/src/workspace/workspace-starter.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1717,7 +1717,7 @@ export class WorkspaceStarter {
17171717
"resource:" +
17181718
ScopedResourceGuard.marshalResourceScope({
17191719
kind: "envVar",
1720-
subjectID: "*/*",
1720+
subjectID: "*/**",
17211721
operations: ["update"],
17221722
}),
17231723
);

0 commit comments

Comments
 (0)