Skip to content

Create BannedUser table

What does this MR do?

Introduce BannedUser table. Following some discussion and testing done by @krasio, it was determined that having a dedicated banned_users table would be the most optimal way to record banned users (introduced by !61292 (merged)). Update the app so that when a user is banned, a new record is inserted into banned_users (and the opposite - when user is unbanned, the record is removed). Banned user contributions will be hidden in a future iteration (!66687 (merged) (WIP))

Migration output:

% rails db:migrate 
== 20210623182010 CreateBannedUsers: migrating ================================
-- create_table(:banned_users)
   -> 0.0111s
== 20210623182010 CreateBannedUsers: migrated (0.0111s) =======================

% rails db:rollback
== 20210623182010 CreateBannedUsers: reverting ================================
-- drop_table(:banned_users)
   -> 0.0026s
== 20210623182010 CreateBannedUsers: reverted (0.0026s) =======================

Screenshots (strongly suggested)

Does this MR meet the acceptance criteria?

Conformity

Availability and Testing

Security

Does this MR contain changes to processing or storing of credentials or tokens, authorization and authentication methods or other items described in the security review guidelines? If not, then delete this Security section.

  • Label as security and @ mention @gitlab-com/gl-security/appsec
  • The MR includes necessary changes to maintain consistency between UI, API, email, or other methods
  • Security reports checked/validated by a reviewer from the AppSec team
Edited by Serena Fang

Merge request reports

Loading