debian-mirror-gitlab/app/models/namespaces/user_namespace.rb

34 lines
1 KiB
Ruby
Raw Normal View History

2021-11-11 11:23:49 +05:30
# frozen_string_literal: true
module Namespaces
2021-12-11 22:18:48 +05:30
####################################################################
# 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
####################################################################
2021-11-11 11:23:49 +05:30
class UserNamespace < Namespace
def self.sti_name
'User'
end
2022-04-04 11:22:00 +05:30
def owners
Array.wrap(owner)
end
2021-11-11 11:23:49 +05:30
end
end