From cfe3b0da2651961db2092ce42bb76194d5009da2 Mon Sep 17 00:00:00 2001 From: Deepjyoti Barman Date: Wed, 25 Sep 2024 13:24:45 +0530 Subject: [PATCH 1/5] Disable passing userContext in user get API --- recipe/dashboard/api/usersGet.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipe/dashboard/api/usersGet.go b/recipe/dashboard/api/usersGet.go index 9c20e5f1..c31b971d 100644 --- a/recipe/dashboard/api/usersGet.go +++ b/recipe/dashboard/api/usersGet.go @@ -121,7 +121,7 @@ func UsersGet(apiImplementation dashboardmodels.APIInterface, tenantId string, o User map[string]interface{} `json:"user"` }) { defer processingGroup.Done() - userMetadataResponse, err := usermetadata.GetUserMetadata(userObj.User["id"].(string), userContext) + userMetadataResponse, err := usermetadata.GetUserMetadata(userObj.User["id"].(string)) <-sem if err != nil { errInBackground = err From ecd6508b95aed826c7a9daccbef54aa16fd26ed8 Mon Sep 17 00:00:00 2001 From: Deepjyoti Barman Date: Wed, 25 Sep 2024 13:27:13 +0530 Subject: [PATCH 2/5] Add a note for not passing userContext in user get API --- recipe/dashboard/api/usersGet.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/recipe/dashboard/api/usersGet.go b/recipe/dashboard/api/usersGet.go index c31b971d..ccb86c95 100644 --- a/recipe/dashboard/api/usersGet.go +++ b/recipe/dashboard/api/usersGet.go @@ -121,6 +121,10 @@ func UsersGet(apiImplementation dashboardmodels.APIInterface, tenantId string, o User map[string]interface{} `json:"user"` }) { defer processingGroup.Done() + + // NOTE: If userContext is passed in the following call, it could + // possibly lead to a concurrent map write error so it's important + // to be careful while adding that. userMetadataResponse, err := usermetadata.GetUserMetadata(userObj.User["id"].(string)) <-sem if err != nil { From fa14a99ba5e3f81886645f7bf774511aa9160a10 Mon Sep 17 00:00:00 2001 From: Deepjyoti Barman Date: Wed, 25 Sep 2024 13:30:38 +0530 Subject: [PATCH 3/5] Bump version to 0.25.0 --- supertokens/constants.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/supertokens/constants.go b/supertokens/constants.go index 1ac2c115..40e7b7a7 100644 --- a/supertokens/constants.go +++ b/supertokens/constants.go @@ -21,7 +21,7 @@ const ( ) // VERSION current version of the lib -const VERSION = "0.24.3" +const VERSION = "0.25.0" var ( cdiSupported = []string{"3.1"} From 19d473fae098cb81d204da7dba8c4b159c646b1e Mon Sep 17 00:00:00 2001 From: Deepjyoti Barman Date: Wed, 25 Sep 2024 13:35:52 +0530 Subject: [PATCH 4/5] Update changelog with change and breaking changes for major version --- CHANGELOG.md | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 986e2de9..5aca16ee 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,16 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [unreleased] +## [0.25.0] - 2024-09-25 + +### Changes + +- Removes use of `UserContext` in user GET API in dashboard recipe. + +### Breaking changes + +- Changes the type of `value` in `TypeFormField` to `interface{}` instead of `string`to add support for any type of value in form fields. + ## [0.24.3] - 2024-09-24 - Adds support for form field related improvements by making fields accept any type of values From 64903a2e6459be17e26db93e1a197620d12d1f58 Mon Sep 17 00:00:00 2001 From: Deepjyoti Barman Date: Wed, 25 Sep 2024 13:44:10 +0530 Subject: [PATCH 5/5] Add change about properly optional in changelog for 0.25 --- CHANGELOG.md | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5aca16ee..dda3ce99 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,15 +12,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Changes - Removes use of `UserContext` in user GET API in dashboard recipe. +- Makes optional fields properly optional (i:e the value can be omitted entirely) ### Breaking changes -- Changes the type of `value` in `TypeFormField` to `interface{}` instead of `string`to add support for any type of value in form fields. - -## [0.24.3] - 2024-09-24 - -- Adds support for form field related improvements by making fields accept any type of values -- Adds support for optional fields to properly optional +- Changes the type of `value` in `TypeFormField` to `interface{}` instead of `string` to add support for any type of value in form fields. ## [0.24.2] - 2024-09-03