Skip to content

User Sync v2.2.1 - bug fix release #270

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Aug 30, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions RELEASE_NOTES.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Release Notes for User Sync Tool Version 2.2.1

These notes apply to v2.2.1rc1 of 2017-08-28.
These notes apply to v2.2.1 of 2017-08-30.

## New Features

Expand All @@ -9,16 +9,20 @@ These notes apply to v2.2.1rc1 of 2017-08-28.
* a `str` (or `unicode` in py2) if the attribute has one value;
* a `list` of `str` (or `unicode` in py2) if the attribute has multiple values.

[#268](https://github.com/adobe-apiplatform/user-sync.py/issues/268): To make sure users get all the right overlapping entitlements associated with mapped user groups, `--strategy push` now does group removals before group adds.

## Bug Fixes

[#257](https://github.com/adobe-apiplatform/user-sync.py/issues/257): Catch exceptions thrown by umapi-client when creating actions.

[#258](https://github.com/adobe-apiplatform/user-sync.py/issues/258): Correctly decrypte private keys in py3.
[#258](https://github.com/adobe-apiplatform/user-sync.py/issues/258): Correctly decrypt private keys in py3.

[#260](https://github.com/adobe-apiplatform/user-sync.py/issues/260): Make sure the requests library is loaded when using pex on Windows.

[#265](https://github.com/adobe-apiplatform/user-sync.py/issues/265): Extended attributes in extensions couldn't be fetched unless they had non-ascii names.

[#269](https://github.com/adobe-apiplatform/user-sync.py/issues/269): When using `--strategy sync`, new users created in secondary organizations were not being added to any groups.

## Compatibility with Prior Versions

There are no functional changes from prior versions.
Expand Down
6 changes: 3 additions & 3 deletions tests/rules_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -155,21 +155,21 @@ def mock_load_users_and_groups(groups=None, extended_attributes=None, all_users=
user = everybody[0]
commands = tests.helper.create_umapi_commands(user)
commands.add_user(self.create_user_attributes_for_commands(user, rule_options['update_user_info']))
commands.add_groups(set([primary_group_11]))
commands.remove_groups(set([primary_group_21]))
commands.add_groups(set([primary_group_11]))
expected_primary_commands_list.append(commands)

user = everybody[1]
commands = tests.helper.create_umapi_commands(user)
commands.add_user(self.create_user_attributes_for_commands(user, rule_options['update_user_info']))
commands.add_groups(set([primary_group_21]))
commands.remove_groups(set([primary_group_11]))
commands.add_groups(set([primary_group_21]))
expected_primary_commands_list.append(commands)

user = everybody[2]
commands = tests.helper.create_umapi_commands(user)
commands.add_user(self.create_user_attributes_for_commands(user, rule_options['update_user_info']))
commands.remove_groups(set([primary_group_11, primary_group_21]))
commands.add_user(self.create_user_attributes_for_commands(user, rule_options['update_user_info']))
expected_primary_commands_list.append(commands)

expected_secondary_commands_list = []
Expand Down
9 changes: 5 additions & 4 deletions user_sync/rules.py
Original file line number Diff line number Diff line change
Expand Up @@ -647,10 +647,10 @@ def add_umapi_user(self, user_key, groups_to_add, umapi_connectors):
self.action_summary['adobe_users_created'] += 1
primary_commands.add_user(attributes)
if manage_groups:
primary_commands.add_groups(groups_to_add)
if doing_push:
groups_to_remove = self.get_umapi_info(PRIMARY_UMAPI_NAME).get_mapped_groups() - groups_to_add
primary_commands.remove_groups(groups_to_remove)
primary_commands.add_groups(groups_to_add)
umapi_connectors.get_primary_connector().send_commands(primary_commands)
# add the user to secondaries, maybe with groups
attributes['option'] = 'ignoreIfAlreadyExists' # can only update in the owning org
Expand All @@ -662,10 +662,11 @@ def add_umapi_user(self, user_key, groups_to_add, umapi_connectors):
self.logger.info('Adding directory user to %s with user key: %s', umapi_name, user_key)
secondary_commands = self.create_commands_from_directory_user(directory_user, identity_type)
secondary_commands.add_user(attributes)
if manage_groups and doing_push:
if manage_groups:
if doing_push:
groups_to_remove = secondary_umapi_info.get_mapped_groups() - groups_to_add
secondary_commands.remove_groups(groups_to_remove)
secondary_commands.add_groups(groups_to_add)
groups_to_remove = secondary_umapi_info.get_mapped_groups() - groups_to_add
secondary_commands.remove_groups(groups_to_remove)
umapi_connector.send_commands(secondary_commands)

def update_umapi_user(self, umapi_info, user_key, umapi_connector,
Expand Down
2 changes: 1 addition & 1 deletion user_sync/version.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,4 @@
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.

__version__ = '2.2.1rc1'
__version__ = '2.2.1'