remove initial invite to demo for ruben@windmill.dev
This commit is contained in:
1
backend/migrations/20221105003256_grant_all.down.sql
Normal file
1
backend/migrations/20221105003256_grant_all.down.sql
Normal file
@@ -0,0 +1 @@
|
||||
-- Add down migration script here
|
||||
13
backend/migrations/20221105003256_grant_all.up.sql
Normal file
13
backend/migrations/20221105003256_grant_all.up.sql
Normal file
@@ -0,0 +1,13 @@
|
||||
-- Add up migration script here
|
||||
|
||||
|
||||
GRANT ALL
|
||||
ON ALL TABLES IN SCHEMA public
|
||||
TO windmill_user;
|
||||
|
||||
|
||||
GRANT ALL
|
||||
ON ALL TABLES IN SCHEMA public
|
||||
TO windmill_admin;
|
||||
|
||||
DELETE FROM workspace_invite WHERE workspace_id = 'demo' AND email = 'ruben@windmill.dev';
|
||||
@@ -802,14 +802,17 @@ async fn login_callback(
|
||||
.await?
|
||||
.unwrap_or(false);
|
||||
if demo_exists {
|
||||
sqlx::query!(
|
||||
if let Err(e) = sqlx::query!(
|
||||
"INSERT INTO workspace_invite
|
||||
(workspace_id, email, is_admin)
|
||||
VALUES ('demo', $1, false)",
|
||||
&email
|
||||
)
|
||||
.execute(&mut tx)
|
||||
.await?;
|
||||
.await
|
||||
{
|
||||
tracing::error!("error inserting invite: {:#?}", e);
|
||||
}
|
||||
}
|
||||
}
|
||||
tx.commit().await?;
|
||||
|
||||
Reference in New Issue
Block a user