Closed ale-rt closed 6 years ago
@davisagli thanks for the review! I am probably not deep enough in the code to understand the implications and starting from #27 I probably did too much :p Let me know if you have further questions or if my comments are based on false assumptions.
Anyway I think I managed to accept all the comments.
Just for a reference the old branch is here https://github.com/collective/collective.workspace/tree/27-fix-update-groups-original.
Ah! I will also add a line in the changelog :)
I'm going to take your work a step further and try to clean up how groups are handled. Will post here soon for you to review...
@ale-rt here are the additional changes I think we want: https://github.com/collective/collective.workspace/compare/27-fix-update-groups...27-fix-update-groups-davisagli?expand=1
Basically I made a separate function for removing from all groups, so that the purpose of _update_groups
is more focused and we don't need the add_auto_groups
option any more.
@davisagli I merged your changes in #30
@davisagli I think we can merge this one now, right?
@ale-rt yeah, go for it. Sorry, I thought I already said you can go ahead and do that but I must not have been clear.
@davisagli you were clear, it is just me that I wanted to be extra sure :) @pysailor can we release a new version?
@ale-rt Sure! I just released https://pypi.org/project/collective.workspace/2.0b3/
This PR adds some test coverage for the
_update_groups method
and fixes its behavior. For example, it was possible to have a user both in the Members and in the Guests groups, given that the condition was only checking on the existent groups. Also it does not remove the Members group when calling this method withadd_auto_groups=False
.Closes #27