Skip to content

Commit

Permalink
Release 1.3.2
Browse files Browse the repository at this point in the history
Bugfixing:
- Include openID and password outside userCredentials to keep compatibility with 2.38.1 DHIS2 builds
- Fix OU tree selection in CSV import

Merge remote-tracking branch 'upstream/master'
  • Loading branch information
ifoche committed Jul 5, 2023
2 parents 3435414 + 0330ea4 commit 34e7498
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 14 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "user-extended-app",
"description": "DHIS2 Extended User app",
"version": "1.3.1",
"version": "1.3.2",
"license": "GPL-3.0",
"author": "EyeSeeTea team",
"homepage": ".",
Expand Down
2 changes: 2 additions & 0 deletions src/data/repositories/UserD2ApiRepository.ts
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,8 @@ export class UserD2ApiRepository implements UserRepository {
userRoles: user?.userCredentials.userRoles,
username: user?.userCredentials.username,
disabled: user?.userCredentials.disabled,
openId: user?.userCredentials.openId,
password: user?.userCredentials.password,
userCredentials: {
...existingUser.userCredentials,
disabled: user?.userCredentials.disabled,
Expand Down
25 changes: 13 additions & 12 deletions src/legacy/components/OrgUnitForm.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import LoadingMask from "d2-ui/lib/loading-mask/LoadingMask.component";
import TextField from "material-ui/TextField/TextField";
import Action from "d2-ui/lib/action/Action";
import { Observable } from "rxjs/Rx";
import OrgUnitTree from "d2-ui/lib/org-unit-tree/OrgUnitTree.component";
import { OrganisationUnitTree } from "@dhis2/ui";
import OrgUnitSelectByLevel from "d2-ui/lib/org-unit-select/OrgUnitSelectByLevel.component";
import OrgUnitSelectByGroup from "d2-ui/lib/org-unit-select/OrgUnitSelectByGroup.component";
import OrgUnitSelectAll from "d2-ui/lib/org-unit-select/OrgUnitSelectAll.component";
Expand Down Expand Up @@ -93,7 +93,7 @@ class OrgUnitForm extends React.Component {
this.props.onChange(newSelected);
}

toggleOrgUnit(ev, orgUnitModel) {
toggleOrgUnit(orgUnitModel) {
const orgUnit = _(orgUnitModel).pick(["id", "shortName", "path", "displayName"]).value();
const newSelected = _(this.props.selected).find(selectedOu => selectedOu.path === orgUnit.path)
? this.props.selected.filter(selectedOu => selectedOu.path !== orgUnit.path)
Expand All @@ -107,16 +107,17 @@ class OrgUnitForm extends React.Component {
if (this.state.rootOrgUnits.length) {
return (
<div style={{ maxHeight: 350, maxWidth: 480, overflow: "auto" }}>
{this.state.rootOrgUnits.map(rootOu => (
<OrgUnitTree
key={rootOu.id}
selected={selectedPaths}
root={rootOu}
onSelectClick={this.toggleOrgUnit}
emitModel
initiallyExpanded={[rootOu.path]}
/>
))}
{this.state.rootOrgUnits.map(rootOu => {
return (
<OrganisationUnitTree
key={rootOu.id}
selected={selectedPaths}
roots={[rootOu.id]}
onChange={this.toggleOrgUnit}
initiallyExpanded={[rootOu.path]}
/>
);
})}
</div>
);
}
Expand Down
2 changes: 1 addition & 1 deletion src/legacy/models/userHelpers.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ const propertiesIgnoredOnImport = ["id", "created", "lastUpdated", "lastLogin"];

const userCredentialsFields = ["username", "password", "userRoles", "disabled", "openId"];

const user238MissingFields = ["username", "userRoles", "disabled"];
const user238MissingFields = ["username", "userRoles", "disabled", "openId", "password"];

const columnNameFromPropertyMapping = {
id: "ID",
Expand Down

0 comments on commit 34e7498

Please sign in to comment.