Skip to content

Commit

Permalink
[ID-752] Default privacy for new accounts (#753)
Browse files Browse the repository at this point in the history
* Update CHANGELOG.md

* Apply default privacy

* Fix version
  • Loading branch information
petyos authored Feb 17, 2025
1 parent f189e1f commit 6ffa6da
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v3
with:
go-version: '1.22.11'
go-version: '1.22.12'
check-latest: true

- name: Build
Expand Down
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## Unreleased
### Changed
- Default privacy for new accounts [#752](https://github.com/rokwire/core-building-block/issues/752)

## [1.47.0] - 2025-30-01
### Added
- Consolidate the information, and make it accessible with a single API call [#747](https://github.com/rokwire/core-building-block/issues/747)
Expand Down
11 changes: 9 additions & 2 deletions driver/web/conversions_user.go
Original file line number Diff line number Diff line change
Expand Up @@ -395,8 +395,15 @@ func privacyFromDef(item *Def.Privacy) model.Privacy {
}

func privacyFromDefNullable(item *Def.PrivacyNullable) model.Privacy {
if item == nil {
return model.Privacy{}
if item == nil { //default privacy
public := true
fieldVisibility := map[string]interface{}{
"first_name": "public",
"last_name": "public",
"middle_name": "public",
"email": "public",
}
return model.Privacy{Public: public, FieldVisibility: fieldVisibility}
}

var public bool
Expand Down

0 comments on commit 6ffa6da

Please sign in to comment.