diff --git a/src/client/ConnectionModal.js b/src/client/ConnectionModal.js
index 1e9ce97..8d549d4 100644
--- a/src/client/ConnectionModal.js
+++ b/src/client/ConnectionModal.js
@@ -116,6 +116,8 @@ function SnowflakeConnectionModal ({ form }) {
}
function BigQueryConnectionModal ({ form }) {
const { dialog, projects } = useSelector(state => state.connection)
+ const env = useSelector(state => state.env)
+ const { DEKART_STORAGE } = env.variables
const { id, loading } = dialog
const dispatch = useDispatch()
const connection = useSelector(state => state.connection.list.find(s => s.id === id))
@@ -163,9 +165,18 @@ function BigQueryConnectionModal ({ form }) {
- Google Cloud Storage bucket to permanently cache query results. Required to share map with other users.>} name='cloudStorageBucket'>
-
-
+ {DEKART_STORAGE === 'USER'
+ ? (
+ Google Cloud Storage bucket to permanently cache query results. Required to share map with other users.>} name='cloudStorageBucket'>
+
+
+ )
+ : (
+ Google Cloud Storage bucket to permanently cache query results.>} name='cloudStorageBucket'>
+
+
+ )}
+
diff --git a/src/server/dekart/connection.go b/src/server/dekart/connection.go
index 8c5d39c..5adb3b7 100644
--- a/src/server/dekart/connection.go
+++ b/src/server/dekart/connection.go
@@ -33,7 +33,7 @@ func (s Server) TestConnection(ctx context.Context, req *proto.TestConnectionReq
if !res.Success {
return res, nil
}
- if req.Connection.CloudStorageBucket == "" {
+ if req.Connection.CloudStorageBucket == "" && os.Getenv("DEKART_STORAGE") == "USER" {
// if no bucket is provided, temp storage is used
return &proto.TestConnectionResponse{
Success: true,
@@ -440,7 +440,7 @@ func (s Server) ArchiveConnection(ctx context.Context, req *proto.ArchiveConnect
`update connections set
archived=true,
updated_at=now()
- where id=$1 and author_email=$2`,
+ where id=$1`,
req.ConnectionId,
claims.Email,
)
diff --git a/src/server/dekart/report.go b/src/server/dekart/report.go
index a33f862..2f2e9e5 100644
--- a/src/server/dekart/report.go
+++ b/src/server/dekart/report.go
@@ -27,7 +27,6 @@ func newUUID() string {
// getReport returns report by id, checks if user has access to it
func (s Server) getReport(ctx context.Context, reportID string) (*proto.Report, error) {
claims := user.GetClaims(ctx)
- log.Debug().Interface("claims", claims).Msg("getReport")
if claims == nil {
log.Fatal().Msg("getReport require claims")
return nil, nil