summaryrefslogtreecommitdiff
path: root/app/graphql/types/namespace/package_settings_type.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/graphql/types/namespace/package_settings_type.rb')
-rw-r--r--app/graphql/types/namespace/package_settings_type.rb14
1 files changed, 14 insertions, 0 deletions
diff --git a/app/graphql/types/namespace/package_settings_type.rb b/app/graphql/types/namespace/package_settings_type.rb
new file mode 100644
index 00000000000..0720a1cfb4b
--- /dev/null
+++ b/app/graphql/types/namespace/package_settings_type.rb
@@ -0,0 +1,14 @@
+# frozen_string_literal: true
+
+module Types
+ class Namespace::PackageSettingsType < BaseObject
+ graphql_name 'PackageSettings'
+
+ description 'Namespace-level Package Registry settings'
+
+ authorize :read_package_settings
+
+ field :maven_duplicates_allowed, GraphQL::BOOLEAN_TYPE, null: false, description: 'Indicates whether duplicate Maven packages are allowed for this namespace.'
+ field :maven_duplicate_exception_regex, Types::UntrustedRegexp, null: true, description: 'When maven_duplicates_allowed is false, you can publish duplicate packages with names that match this regex. Otherwise, this setting has no effect.'
+ end
+end