Skip to content

Commit

Permalink
Merge pull request #454 from EyeSeeTea/development
Browse files Browse the repository at this point in the history
Release 2.6.1
  • Loading branch information
adrianq authored Apr 10, 2024
2 parents 8c2c9ba + bb6dd37 commit c3cdc04
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 17 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "d2-dataset-configuration",
"version": "2.6.0",
"version": "2.6.1",
"description": "Dataset Configuration User Interface",
"main": "src/index.html",
"scripts": {
Expand Down
16 changes: 0 additions & 16 deletions src/models/DataSetStore.js
Original file line number Diff line number Diff line change
Expand Up @@ -724,34 +724,18 @@ export default class DataSetStore {
return update(categoryCombo, sharing.object);
}

_getUserGroupName(_coreCompetency, countryCode) {
// https://app.clickup.com/t/865d6fte5 - Use only country code
return `${countryCode}_Users`;
}

_addWarnings(saving, msgs) {
return _.imerge(saving, { warnings: saving.warnings.concat(msgs) });
}

_addSharingToDataset(saving) {
const { dataset } = saving;
const { coreCompetencies } = this.associations;

const coreCompetenciesSharing = _.cartesianProduct(
coreCompetencies,
saving.countryCodes
).map(([coreCompetency, countryCode]) => {
const userGroupName = this._getUserGroupName(coreCompetency, countryCode);
return [userGroupName, { access: "r-rw----" }];
});

const userGroupSharingByName = _(saving.countryCodes)
.flatMap(countryCode => [
[countryCode + "_Users", { access: "r-rw----" }],
[countryCode + "_Administrators", { access: "rwrw----" }],
])
.concat(coreCompetenciesSharing)
.concat([["GL_GlobalAdministrator", { access: "rwrw----" }]])
.fromPairs()
.value();

Expand Down

0 comments on commit c3cdc04

Please sign in to comment.