discourse/app
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
..
assets FIX: Can't remove selection from group chooser in tag group settings (#11822) 2021-01-26 10:22:05 -08:00
controllers FIX: reindex_search job should work on model with no search data (#11819) 2021-01-25 11:23:36 +01:00
helpers FIX: Cleanup authentication_data cookie after login (#11834) 2021-01-25 13:47:44 +00:00
jobs FIX: move post_search_data migration into onceoff job (#11851) 2021-01-26 16:29:00 +01:00
mailers FEATURE: reason to reject user signup (#11700) 2021-01-15 09:43:26 +11:00
models FIX: only de-prioritise exact matches in mentions (#11843) 2021-01-25 21:27:15 +01:00
serializers FIX: Update categories without full page refresh (#11793) 2021-01-22 10:21:09 +02:00
services FIX: Destroy associated user api keys when making a user anonymous. (#11760) 2021-01-25 11:07:22 -03:00
views FIX: Cleanup authentication_data cookie after login (#11834) 2021-01-25 13:47:44 +00:00