Skip to content
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

3.6.0 - Not possible to deactivate user from REST API #18710

Closed
emikolajczak opened this issue Aug 28, 2020 · 2 comments · Fixed by #18864
Closed

3.6.0 - Not possible to deactivate user from REST API #18710

emikolajczak opened this issue Aug 28, 2020 · 2 comments · Fixed by #18864
Assignees
Labels
feat: rest stat: triaged Issue reviewed and properly tagged type: bug
Milestone

Comments

@emikolajczak
Copy link

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:

@emikolajczak emikolajczak changed the title 3.6.0-rc.2 - Not possible to deactivate user from REST API 3.6.0 - Not possible to deactivate user from REST API Sep 2, 2020
@sampaiodiego sampaiodiego added this to the 3.7.0 milestone Sep 2, 2020
@sampaiodiego
Copy link
Member

Indeed a new param was added to confirm the action by #16088 but it was not ported to REST endpoints.

@emikolajczak
Copy link
Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feat: rest stat: triaged Issue reviewed and properly tagged type: bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants