Sfoglia il codice sorgente

Fix to signed in user when user <-> org link is gone

Torkel Ödegaard 10 anni fa
parent
commit
bf9e51928d
1 ha cambiato i file con 5 aggiunte e 0 eliminazioni
  1. 5 0
      pkg/services/sqlstore/user.go

+ 5 - 0
pkg/services/sqlstore/user.go

@@ -283,6 +283,11 @@ func GetSignedInUser(query *m.GetSignedInUserQuery) error {
 		return m.ErrUserNotFound
 	}
 
+	if user.OrgRole == "" {
+		user.OrgId = -1
+		user.OrgName = "Org missing"
+	}
+
 	query.Result = &user
 	return err
 }