Skip to content

Commit

Permalink
fix: added support for signupDisabled (#803)
Browse files Browse the repository at this point in the history
  • Loading branch information
dbarrosop authored Nov 16, 2023
1 parent f1f9c08 commit d9b92a7
Show file tree
Hide file tree
Showing 12 changed files with 99 additions and 20 deletions.
3 changes: 2 additions & 1 deletion cmd/config/example.go
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,8 @@ func commandExample(cCtx *cli.Context) error { //nolint:funlen,maintidx
},
},
SignUp: &model.ConfigAuthSignUp{
Enabled: ptr(true),
Enabled: ptr(true),
DisableNewUsers: ptr(false),
},
User: &model.ConfigAuthUser{
Roles: &model.ConfigAuthUserRoles{
Expand Down
5 changes: 4 additions & 1 deletion cmd/config/validate_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,10 @@ func expectedConfig() *model.ConfigConfig {
ClientUrl: ptr("http://localhost:3000"),
AllowedUrls: []string{},
},
SignUp: &model.ConfigAuthSignUp{Enabled: ptr(true)},
SignUp: &model.ConfigAuthSignUp{
Enabled: ptr(true),
DisableNewUsers: ptr(false),
},
User: &model.ConfigAuthUser{
Roles: &model.ConfigAuthUserRoles{
Default: ptr("user"),
Expand Down
1 change: 1 addition & 0 deletions dockercompose/auth_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ func expectedAuth() *Service {
"AUTH_API_PREFIX": "/v1",
"AUTH_CLIENT_URL": "http://localhost:3000",
"AUTH_DISABLE_NEW_USERS": "false",
"AUTH_DISABLE_SIGNUP": "false",
"AUTH_EMAIL_PASSWORDLESS_ENABLED": "true",
"AUTH_EMAIL_SIGNIN_EMAIL_VERIFIED_REQUIRED": "true",
"AUTH_GRAVATAR_DEFAULT": "gravatarDefault",
Expand Down
3 changes: 2 additions & 1 deletion dockercompose/main_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,8 @@ func getConfig() *model.ConfigConfig { //nolint:maintidx
},
},
SignUp: &model.ConfigAuthSignUp{
Enabled: ptr(true),
Enabled: ptr(true),
DisableNewUsers: ptr(false),
},
Totp: &model.ConfigAuthTotp{
Enabled: ptr(true),
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ require (
github.com/go-git/go-git/v5 v5.9.0
github.com/google/go-cmp v0.6.0
github.com/hashicorp/go-getter v1.7.3
github.com/nhost/be v0.0.0-20231107151453-7e54cb68abc2
github.com/nhost/be v0.0.0-20231115145121-4df40f281955
github.com/pelletier/go-toml/v2 v2.1.0
github.com/urfave/cli/v2 v2.25.7
github.com/wI2L/jsondiff v0.4.0
Expand Down
2 changes: 2 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -446,6 +446,8 @@ github.com/nhost/be v0.0.0-20231107143741-114c8c189274 h1:53zsrfBgz1EjWIz04btAbO
github.com/nhost/be v0.0.0-20231107143741-114c8c189274/go.mod h1:wYw8iVi1dZG6IAK0eCSOFAWHAISTa+9sjGA6Vx/x1Sg=
github.com/nhost/be v0.0.0-20231107151453-7e54cb68abc2 h1:KhTGs5SUCi7zWYAS9Dag2POf6ok6rWUCW+On8KakoME=
github.com/nhost/be v0.0.0-20231107151453-7e54cb68abc2/go.mod h1:wYw8iVi1dZG6IAK0eCSOFAWHAISTa+9sjGA6Vx/x1Sg=
github.com/nhost/be v0.0.0-20231115145121-4df40f281955 h1:2IW0EEbAnz6QoOa4SztmAAImZqOZW6zpstSznyaenU4=
github.com/nhost/be v0.0.0-20231115145121-4df40f281955/go.mod h1:wYw8iVi1dZG6IAK0eCSOFAWHAISTa+9sjGA6Vx/x1Sg=
github.com/onsi/gomega v1.27.10 h1:naR28SdDFlqrG6kScpT8VWpu1xWY5nJRCF3XaYyBjhI=
github.com/onsi/gomega v1.27.10/go.mod h1:RsS8tutOdbdgzbPtzzATp12yT7kM5I5aElG3evPbQ0M=
github.com/pelletier/go-toml/v2 v2.1.0 h1:FnwAJ4oYMvbT/34k9zzHuZNrhlz48GB3/s6at6/MHO4=
Expand Down
5 changes: 2 additions & 3 deletions nix/overlay.nix
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,12 @@

go = prev.go_1_21.overrideAttrs
(finalAttrs: previousAttrs: rec {
version = "1.21.3";
version = "1.21.4";

src = final.fetchurl {
url = "https://go.dev/dl/go${version}.src.tar.gz";
sha256 = "sha256-GG8rb4yLcE5paCGwmrIEGlwe4T3LwxVqE63PdZMe5Ig=";
sha256 = "sha256-R7Jqg9K2WjwcG8rOJztpvuSaentRaKdgTe09JqN714c=";
};

});

buildGoModule = prev.buildGoModule.override { go = go; };
Expand Down
71 changes: 63 additions & 8 deletions vendor/github.com/nhost/be/services/mimir/model/cuegraph_gen.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 4 additions & 1 deletion vendor/github.com/nhost/be/services/mimir/schema/schema.cue

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion vendor/modules.txt
Original file line number Diff line number Diff line change
Expand Up @@ -397,7 +397,7 @@ github.com/muesli/reflow/wrap
# github.com/muesli/termenv v0.15.2
## explicit; go 1.17
github.com/muesli/termenv
# github.com/nhost/be v0.0.0-20231107151453-7e54cb68abc2
# github.com/nhost/be v0.0.0-20231115145121-4df40f281955
## explicit; go 1.21
github.com/nhost/be/services/mimir/model
github.com/nhost/be/services/mimir/schema
Expand Down

0 comments on commit d9b92a7

Please sign in to comment.