Skip to content

Commit

Permalink
Merge pull request #558 from eea/develop
Browse files Browse the repository at this point in the history
remove traces of email and fullname in the profile edit form
  • Loading branch information
UnaiEtxaburu committed Feb 28, 2024
2 parents de43d4b + 67175cb commit aa14629
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 1 deletion.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,12 @@ All notable changes to this project will be documented in this file. Dates are d

Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).

### [1.1.119](https://github.com/eea/volto-clms-theme/compare/1.1.118...1.1.119) - 28 February 2024

#### :hammer_and_wrench: Others

- remove consolelog [Mikel Larreategi - [`9c88aa2`](https://github.com/eea/volto-clms-theme/commit/9c88aa298fe8fdfe28dd8267a1015726b17e5065)]
- remove traces of email and fullname in the profile edit form [Mikel Larreategi - [`bd3089f`](https://github.com/eea/volto-clms-theme/commit/bd3089fa6a8ed1dea95d25709349325aa6d6f582)]
### [1.1.118](https://github.com/eea/volto-clms-theme/compare/1.1.117...1.1.118) - 23 February 2024

#### :hammer_and_wrench: Others
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@eeacms/volto-clms-theme",
"version": "1.1.118",
"version": "1.1.119",
"description": "volto-clms-theme: Volto theme for CLMS site",
"main": "src/index.js",
"author": "CodeSyntax for the European Environment Agency",
Expand Down
7 changes: 7 additions & 0 deletions src/components/CLMSProfileView/CLMSUserProfileView.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -178,13 +178,20 @@ class CLMSUserProfileView extends Component {
*/
render() {
let userschema = {};

if (this.props.userschema?.loaded) {
userschema = JSON.parse(
JSON.stringify(this.props?.userschema?.userschema),
);
userschema.fieldsets[0]['fields'] = userschema.fieldsets[0][
'fields'
].filter((item) => !item.includes('email') && !item.includes('fullname'));

userschema.required = userschema.required.filter(
(item) => item !== 'email' && item !== 'fullname',
);
delete userschema.properties.email;
delete userschema.properties.fullname;
}

const loggedIn = !!this.props.userId;
Expand Down

0 comments on commit aa14629

Please sign in to comment.