Skip to content

Commit 6e9488e

Browse files
committed
Fixed a problem with user org pivot
1 parent e4141da commit 6e9488e

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

shared.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11736,8 +11736,9 @@ func HandleChangeUserOrg(resp http.ResponseWriter, request *http.Request) {
1173611736
return
1173711737
}
1173811738

11739-
// Support access pivot
11740-
if strings.HasSuffix(user.Username, "@shuffler.io") && user.SupportAccess && user.Active && user.Verified && project.Environment == "cloud" {
11739+
// Support access pivot to an org BY EMAIL (not org id)
11740+
if strings.Contains(fileId, "@") && strings.Contains(fileId, ".") && user.SupportAccess && user.Active && user.Verified && project.Environment == "cloud" {
11741+
//foundUsers, err := FindUser(ctx, fileId)
1174111742
foundUsers, err := FindUser(ctx, fileId)
1174211743
if err != nil || len(foundUsers) == 0 {
1174311744
log.Printf("[ERROR] Failed finding user %s for support access: %s", user.Username, err)

0 commit comments

Comments
 (0)