debian-mirror-gitlab/lib/api/helpers/groups_helpers.rb

48 lines
2.1 KiB
Ruby
Raw Normal View History

2019-09-04 21:01:54 +05:30
# frozen_string_literal: true
module API
module Helpers
module GroupsHelpers
extend ActiveSupport::Concern
extend Grape::API::Helpers
params :optional_params_ce do
optional :description, type: String, desc: 'The description of the group'
optional :visibility, type: String,
values: Gitlab::VisibilityLevel.string_values,
desc: 'The visibility of the group'
2019-12-21 20:55:43 +05:30
optional :share_with_group_lock, type: Boolean, desc: 'Prevent sharing a project with another group within this group'
optional :require_two_factor_authentication, type: Boolean, desc: 'Require all users in this group to setup Two-factor authentication'
optional :two_factor_grace_period, type: Integer, desc: 'Time before Two-factor authentication is enforced'
optional :project_creation_level, type: String, values: ::Gitlab::Access.project_creation_string_values, desc: 'Determine if developers can create projects in the group', as: :project_creation_level_str
optional :auto_devops_enabled, type: Boolean, desc: 'Default to Auto DevOps pipeline for all projects within this group'
optional :subgroup_creation_level, type: String, values: ::Gitlab::Access.subgroup_creation_string_values, desc: 'Allowed to create subgroups', as: :subgroup_creation_level_str
optional :emails_disabled, type: Boolean, desc: 'Disable email notifications'
2020-03-13 15:44:24 +05:30
optional :mentions_disabled, type: Boolean, desc: 'Disable a group from getting mentioned'
2019-09-04 21:01:54 +05:30
optional :lfs_enabled, type: Boolean, desc: 'Enable/disable LFS for the projects in this group'
optional :request_access_enabled, type: Boolean, desc: 'Allow users to request member access'
end
params :optional_params_ee do
end
params :optional_update_params_ee do
end
params :optional_params do
use :optional_params_ce
use :optional_params_ee
end
2019-12-04 20:38:33 +05:30
params :optional_projects_params_ee do
end
params :optional_projects_params do
use :optional_projects_params_ee
end
2019-09-04 21:01:54 +05:30
end
end
end
2019-12-04 20:38:33 +05:30
API::Helpers::GroupsHelpers.prepend_if_ee('EE::API::Helpers::GroupsHelpers')