mirror of
https://github.com/outbackdingo/firezone.git
synced 2026-01-27 18:18:55 +00:00
Update script to rotate global relays token
This commit is contained in:
@@ -370,10 +370,10 @@ iex(web@web-2f4j.us-east1-d.c.firezone-staging.internal)7> {:ok, subject} = Doma
|
||||
|
||||
```elixir
|
||||
|
||||
iex(web@web-xxxx.us-east1-d.c.firezone-staging.internal)1> # select group to update
|
||||
iex(web@web-xxxx.us-east1-d.c.firezone-staging.internal)1> group = Domain.Repo.one!(Domain.Relays.Group.Query.global())
|
||||
...
|
||||
|
||||
iex(web@web-xxxx.us-east1-d.c.firezone-staging.internal)2> {:ok, token} = Domain.Relays.create_token(group, %{}, subject)
|
||||
iex(web@web-xxxx.us-east1-d.c.firezone-staging.internal)2> {:ok, token} = Domain.Relays.create_token(group, %{})
|
||||
...
|
||||
```
|
||||
|
||||
|
||||
@@ -18,6 +18,10 @@ defmodule Domain.Relays.Group.Query do
|
||||
where(queryable, [groups: groups], groups.account_id == ^account_id)
|
||||
end
|
||||
|
||||
def global(queryable \\ not_deleted()) do
|
||||
where(queryable, [groups: groups], is_nil(groups.account_id))
|
||||
end
|
||||
|
||||
def global_or_by_account_id(queryable \\ not_deleted(), account_id) do
|
||||
where(
|
||||
queryable,
|
||||
|
||||
Reference in New Issue
Block a user