[Ban user - Cloud] Could not retrieve banned user status in Project/Group level Restful API

Summary

In the Ultimate version (Cloud), we can ban a user from a group: link image

But we could not find related API, especially Project/Group level api return anything different after this user is banned. Is that expected? Is there any related API to retrieve banned user Information?

  1. User state doesn't change in Project/Group member API

image

  1. Nothing changes in displayed project members in GitLab UI (Banned user still displayed as active member) image

Steps to reproduce

  1. Login with Ultimate account
  2. Ban user A in group A, which own project A
  3. Check project members for project A

Example Project

Project 64887775, named ""project_with_ban_user""

What is the current bug behavior?

  1. Actual: user A shows as a normal user

What is the expected correct behavior?

  1. Expect: user A should show as banned, and the user status should change to blocked or banned in Project/Group level restful API

Relevant logs and/or screenshots

Output of checks

Results of GitLab environment info

Expand for output related to GitLab environment info

(For installations with omnibus-gitlab package run and paste the output of:
`sudo gitlab-rake gitlab:env:info`)

(For installations from source run and paste the output of:
`sudo -u git -H bundle exec rake gitlab:env:info RAILS_ENV=production`)

Results of GitLab application Check

Expand for output related to the GitLab application check

(For installations with omnibus-gitlab package run and paste the output of: sudo gitlab-rake gitlab:check SANITIZE=true)

(For installations from source run and paste the output of: sudo -u git -H bundle exec rake gitlab:check RAILS_ENV=production SANITIZE=true)

(we will only investigate if the tests are passing)

Possible fixes

Edited by 吴琼