-
-
Notifications
You must be signed in to change notification settings - Fork 669
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
Remove deactivated users from groups #5899
Comments
I haven't read much of the chat thread, but I read the API changelog for 303 in https://github.com/zulip/zulip/blob/9b7a4c89e/api_docs/changelog.md#changes-in-zulip-100 **Feature level 303**
* [`POST /register`](/api/register-queue), [`GET /user_groups`](/api/get-user-groups),
[`GET /user_groups/{user_group_id}/members/{user_id}`](/api/get-is-user-group-member),
[`GET /user_groups/{user_group_id}/members`](/api/get-user-group-members):
Deactivated users are no longer returned as members of the user groups
that they were members of prior to deactivation.
* [`POST /register`](/api/register-queue): Settings, represented as
[group-setting value](/api/group-setting-values), will never include
deactivated users in the `direct_members` list for settings whose
value is an anonymous group.
* [`POST /user_groups/{user_group_id}/members`](/api/update-user-group-members):
Deactivated users cannot be added or removed from a user group; they
are now implicitly not members of any groups while deactivated.
* [`GET /events`](/api/get-events): User reactivation event is not sent
to users who cannot access the reactivated user anymore due to a
`can_access_all_users_group` policy.
* [`GET /events`](/api/get-events): The server will now send
`user_group` events with the `add_members`/`remove_members`
operations as appropriate when deactivating or reactivating a user,
to ensure client state correctly reflects groups never containing
deactivated users.
* [`GET /events`](/api/get-events): To ensure that [group-setting
values](/api/group-setting-values) are correct, `realm/update_dict`
and `user_group/update` events may now be by sent by the server when
processing a deactivation/reactivation of a user, to ensure client
state correctly reflects the state, given that deactivated users
cannot have permissions in an organization. and in particular that next-to-last bullet: * [`GET /events`](/api/get-events): The server will now send
`user_group` events with the `add_members`/`remove_members`
operations as appropriate when deactivating or reactivating a user,
to ensure client state correctly reflects groups never containing
deactivated users. We do have code that handles |
Hmm. I believe the outcome of that I think the story may be:
It looks like the notes added to individual pages in the API docs in that same PR: Definitely that changelog entry is confusing, though. It should clarify that "as appropriate" only means when the client isn't going to get a "user was deactivated" event. So that'd be good to bring up on that |
The `is_active` property of realm_user/update events is new in Zulip Server 8.0 (FL 222): https://zulip.com/api/get-events#realm_user-update Start handling it by moving the user between `state.users` (where we keep active users) and `state.realm.nonActiveUsers`. For servers 10.0+ (starting at FL 303), the client has more to do to handle user deactivation; that's zulip#5899 "Remove deactivated users from groups". Best to do this more basic thing first.
As newly required to support Zulip Server 10+; see zulip#5899. Fixes: zulip#5899
Sure, makes sense: https://chat.zulip.org/#narrow/channel/378-api-design/topic/Groups.20events.20for.20deactivated.20users/near/1979327 |
The `is_active` property of realm_user/update events is new in Zulip Server 8.0 (FL 222): https://zulip.com/api/get-events#realm_user-update Start handling it by moving the user between `state.users` (where we keep active users) and `state.realm.nonActiveUsers`. For servers 10.0+ (starting at FL 303), the client has more to do to handle user deactivation; that's zulip#5899 "Remove deactivated users from groups". Best to do this more basic thing first.
As newly required to support Zulip Server 10+; see zulip#5899. Fixes: zulip#5899
The `is_active` property of realm_user/update events is new in Zulip Server 8.0 (FL 222): https://zulip.com/api/get-events#realm_user-update Start handling it by moving the user between `state.users` (where we keep active users) and `state.realm.nonActiveUsers`. For servers 10.0+ (starting at FL 303), the client has more to do to handle user deactivation; that's zulip#5899 "Remove deactivated users from groups". Best to do this more basic thing first.
For current servers starting with zulip/zulip#29498 (server-10, ZFL 303), deactivated users are no longer members of any groups.
On the client side, the change this requires is that when we get a
realm_user
/update
event saying a user was deactivated, we should remove them from all groups. See API docs.Chat thread: https://chat.zulip.org/#narrow/stream/378-api-design/topic/Groups.20events.20for.20deactivated.20users/near/1958907
The text was updated successfully, but these errors were encountered: