Rocket.chat: 3.6.0 - Not possible to deactivate user from REST API

Created on 28 Aug 2020  路  2Comments  路  Source: RocketChat/Rocket.Chat

Description:

I have tested on newst develop branch. There is not possible to deactivate user which is owner of any room from REST API. When I try to do this an error apears:

{ "details": { "shouldBeRemoved": [ "tescik" ], "shouldChangeOwner": [ "enc test 2", "aaa", "test-delete" ] }, "error": "[user-last-owner]", "errorType": "user-last-owner", "success": false }

Steps to reproduce:

  1. Try "Deactivate" user which is owner of any room from REST API call
  2. Described error appears

Expected behavior:

User will be deactivated and new owners of rooms will be assigned

Actual behavior:

user-last-owner error appears

Server Setup Information:

  • Version of Rocket.Chat Server: 3.6.0-rc.2
  • Operating System: Centos 7
  • Deployment Method: docker compose
  • Number of Running Instances: 9
  • DB Replicaset Oplog: YES
  • NodeJS Version: v12.16.1
  • MongoDB Version: 4.0.13

Client Setup Information

  • Desktop App or Browser Version: both
  • Operating System: Windows 10

Additional context

Relevant logs:


Triaged rest bug

Most helpful comment

Hi, in our case best will be parameter which can indicate if deactivated user should be or should not removed as an owner. According to some our company policies users are deactivating and activating again. In old api version they not removed as an room owner and when activated again they still can manage their rooms.
Please consider it.

All 2 comments

Indeed a new param was added to confirm the action by https://github.com/RocketChat/Rocket.Chat/pull/16088 but it was not ported to REST endpoints.

Hi, in our case best will be parameter which can indicate if deactivated user should be or should not removed as an owner. According to some our company policies users are deactivating and activating again. In old api version they not removed as an room owner and when activated again they still can manage their rooms.
Please consider it.

Was this page helpful?
0 / 5 - 0 ratings