This repository has been archived on 2023-03-18. You can view files and clone it, but cannot push or open issues or pull requests.
osr-discourse-src/app/assets/javascripts/discourse
tshenry 65cf3230ee
FIX: Can't remove selection from group chooser in tag group settings (#11822)
This change fixes an issue with the user group chooser of a tag group's settings. It was impossible to clear any selected groups through the UI.

The `setPermissionsGroups` function determines which groups appear selected in the group-chooser based on the passed-in `groupIds` array.

It starts with `updatedPermissions` being set to the group permissions as they were prior to the action that called the function. From there, we were correctly adding a group permission to `updatedPermissions` whenever a group appeared in `groupIds`. This addressed newly added groups and also maintained any group permissions that had been set before. The problem was that there was no logic to remove a group permission when the associated group no longer appeared in `groupIds`. If a group isn't included in `groupIds`, we can simply attempt to delete an associated group permission if it exists.
2021-01-26 10:22:05 -08:00
..
app FIX: Can't remove selection from group chooser in tag group settings (#11822) 2021-01-26 10:22:05 -08:00
config Sync up master with Ember CLI branch where possible (#11707) 2021-01-14 12:52:51 -05:00
public/assets/scripts Sync up master and Ember CLI branches again (#11746) 2021-01-18 16:12:45 -05:00
tests DEV: Add test (#11847) 2021-01-26 14:44:00 +02:00
.ember-cli REFACTOR: Sync up master with changes for Ember-CLI (#11671) 2021-01-12 10:13:21 -05:00
ember-cli-build.js Sync up master and Ember CLI branches again (#11746) 2021-01-18 16:12:45 -05:00
package.json Sync up master and Ember CLI branches again (#11746) 2021-01-18 16:12:45 -05:00
testem.js Sync up master and Ember CLI branches again (#11746) 2021-01-18 16:12:45 -05:00