Unverified Commit a04942fa authored by davelopez's avatar davelopez
Browse files

Keep old API behavior for now

Do not allow to remove or replace, only add users and roles.
parent 1e2348e5
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -99,8 +99,9 @@ class GroupsManager:
        if payload.role_ids is not None:
            roles = get_roles_by_ids(sa_session, payload.role_ids)

        if payload.user_ids is not None or payload.role_ids is not None:
            self._app.security_agent.set_entity_group_associations(groups=[group], roles=roles, users=users)
        self._app.security_agent.set_entity_group_associations(
            groups=[group], roles=roles, users=users, delete_existing_assocs=False
        )

        with transaction(sa_session):
            sa_session.commit()