Commit 4a0bb9ff authored by charlie ablett's avatar charlie ablett

Discourage modifying UserNamespace class

Because `:namespace` factory implicitly meant
'User' namespace, we want to ensure existing tests
are still testing against the intended functionality.
parent 1b3a4e6e
......@@ -3,6 +3,26 @@
# TODO: currently not created/mapped in the database, will be done in another issue
# https://gitlab.com/gitlab-org/gitlab/-/issues/341070
module Namespaces
####################################################################
# PLEASE DO NOT OVERRIDE METHODS IN THIS CLASS!
#
# This class is a placeholder for STI. But we also want to ensure
# tests using `:namespace` factory are still testing the same functionality.
#
# Many legacy tests use `:namespace` which has a slight semantic
# mismatch as it always has been a User (personal) namespace.
#
# If you need to make a change here, please ping the
# Manage/Workspaces group so we can ensure that the
# changes do not break existing functionality.
#
# As Namespaces evolve we may be able to relax this restriction
# but for now, please check in with us <3
#
# For details, see the discussion in
# https://gitlab.com/gitlab-org/gitlab/-/merge_requests/74152
####################################################################
class UserNamespace < Namespace
def self.sti_name
'User'
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment