-
Notifications
You must be signed in to change notification settings - Fork 271
feat(auth): Add enableAnonymousUser param to CreateTenant and UpdateTenant #412
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 3 commits
ba6e78b
0f7899f
a3dfd67
2600d00
41db8d3
9d6bfe9
6e3fc83
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -47,6 +47,7 @@ type Tenant struct { | |
| DisplayName string `json:"displayName"` | ||
| AllowPasswordSignUp bool `json:"allowPasswordSignup"` | ||
| EnableEmailLinkSignIn bool `json:"enableEmailLinkSignin"` | ||
| EnableAnonymousUsers bool `json:"enableAnonymousUser"` | ||
| } | ||
|
|
||
| // TenantClient is used for managing users, configuring SAML/OIDC providers, and generating email | ||
|
|
@@ -216,6 +217,7 @@ const ( | |
| tenantDisplayNameKey = "displayName" | ||
| allowPasswordSignUpKey = "allowPasswordSignup" | ||
| enableEmailLinkSignInKey = "enableEmailLinkSignin" | ||
| enableAnonymousUser = "enableAnonymousUser" | ||
| ) | ||
|
|
||
| // TenantToCreate represents the options used to create a new tenant. | ||
|
|
@@ -240,6 +242,11 @@ func (t *TenantToCreate) EnableEmailLinkSignIn(enable bool) *TenantToCreate { | |
| return t.set(enableEmailLinkSignInKey, enable) | ||
| } | ||
|
|
||
| // EnableAnonymousUsers enables or disables anonymous user. | ||
|
||
| func (t *TenantToCreate) EnableAnonymousUsers(enable bool) *TenantToCreate { | ||
| return t.set(enableAnonymousUser, enable) | ||
| } | ||
|
|
||
| func (t *TenantToCreate) set(key string, value interface{}) *TenantToCreate { | ||
| t.ensureParams().Set(key, value) | ||
| return t | ||
|
|
@@ -275,6 +282,11 @@ func (t *TenantToUpdate) EnableEmailLinkSignIn(enable bool) *TenantToUpdate { | |
| return t.set(enableEmailLinkSignInKey, enable) | ||
| } | ||
|
|
||
| // EnableAnonymousUsers enables or disables anonymous user. | ||
|
||
| func (t *TenantToUpdate) EnableAnonymousUsers(enable bool) *TenantToUpdate { | ||
| return t.set(enableAnonymousUser, enable) | ||
| } | ||
|
|
||
| func (t *TenantToUpdate) set(key string, value interface{}) *TenantToUpdate { | ||
| if t.params == nil { | ||
| t.params = make(nestedMap) | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.