diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-03-19 21:09:17 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-03-19 21:09:17 +0300 |
commit | 0eb4fd2f32e6804bc85868ba167170238e346279 (patch) | |
tree | c020e787ea29c77e1e9f53c21940f88a87a6e905 /lib | |
parent | 78d8830cec030ff12afed3c8ae1dddec454d0a24 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'lib')
-rw-r--r-- | lib/api/entities/project.rb | 1 | ||||
-rw-r--r-- | lib/api/helpers/projects_helpers.rb | 2 | ||||
-rw-r--r-- | lib/gitlab/graphql/connections.rb | 4 | ||||
-rw-r--r-- | lib/gitlab/graphql/pagination/offset_active_record_relation_connection.rb | 2 | ||||
-rw-r--r-- | lib/gitlab/graphql/pagination/relations/offset_active_record_relation.rb | 12 |
5 files changed, 4 insertions, 17 deletions
diff --git a/lib/api/entities/project.rb b/lib/api/entities/project.rb index 85a00273192..39cd2d610e4 100644 --- a/lib/api/entities/project.rb +++ b/lib/api/entities/project.rb @@ -59,6 +59,7 @@ module API expose(:issues_access_level) { |project, options| project.project_feature.string_access_level(:issues) } expose(:repository_access_level) { |project, options| project.project_feature.string_access_level(:repository) } expose(:merge_requests_access_level) { |project, options| project.project_feature.string_access_level(:merge_requests) } + expose(:forking_access_level) { |project, options| project.project_feature.string_access_level(:forking) } expose(:wiki_access_level) { |project, options| project.project_feature.string_access_level(:wiki) } expose(:builds_access_level) { |project, options| project.project_feature.string_access_level(:builds) } expose(:snippets_access_level) { |project, options| project.project_feature.string_access_level(:snippets) } diff --git a/lib/api/helpers/projects_helpers.rb b/lib/api/helpers/projects_helpers.rb index 85ed8a4d636..cedf50aaff6 100644 --- a/lib/api/helpers/projects_helpers.rb +++ b/lib/api/helpers/projects_helpers.rb @@ -24,6 +24,7 @@ module API optional :issues_access_level, type: String, values: %w(disabled private enabled), desc: 'Issues access level. One of `disabled`, `private` or `enabled`' optional :repository_access_level, type: String, values: %w(disabled private enabled), desc: 'Repository access level. One of `disabled`, `private` or `enabled`' optional :merge_requests_access_level, type: String, values: %w(disabled private enabled), desc: 'Merge requests access level. One of `disabled`, `private` or `enabled`' + optional :forking_access_level, type: String, values: %w(disabled private enabled), desc: 'Forks access level. One of `disabled`, `private` or `enabled`' optional :wiki_access_level, type: String, values: %w(disabled private enabled), desc: 'Wiki access level. One of `disabled`, `private` or `enabled`' optional :builds_access_level, type: String, values: %w(disabled private enabled), desc: 'Builds access level. One of `disabled`, `private` or `enabled`' optional :snippets_access_level, type: String, values: %w(disabled private enabled), desc: 'Snippets access level. One of `disabled`, `private` or `enabled`' @@ -104,6 +105,7 @@ module API :default_branch, :description, :emails_disabled, + :forking_access_level, :issues_access_level, :lfs_enabled, :merge_requests_access_level, diff --git a/lib/gitlab/graphql/connections.rb b/lib/gitlab/graphql/connections.rb index 0c0bfe5a458..08d5cd0b72e 100644 --- a/lib/gitlab/graphql/connections.rb +++ b/lib/gitlab/graphql/connections.rb @@ -16,10 +16,6 @@ module Gitlab Gitlab::Graphql::ExternallyPaginatedArray, Gitlab::Graphql::Connections::ExternallyPaginatedArrayConnection ) - GraphQL::Relay::BaseConnection.register_connection_implementation( - Gitlab::Graphql::Pagination::Relations::OffsetActiveRecordRelation, - Gitlab::Graphql::Pagination::OffsetActiveRecordRelationConnection - ) end end end diff --git a/lib/gitlab/graphql/pagination/offset_active_record_relation_connection.rb b/lib/gitlab/graphql/pagination/offset_active_record_relation_connection.rb index c852fbf0ab8..33f84701562 100644 --- a/lib/gitlab/graphql/pagination/offset_active_record_relation_connection.rb +++ b/lib/gitlab/graphql/pagination/offset_active_record_relation_connection.rb @@ -6,7 +6,7 @@ module Gitlab module Graphql module Pagination - class OffsetActiveRecordRelationConnection < GraphQL::Relay::RelationConnection + class OffsetActiveRecordRelationConnection < GraphQL::Pagination::ActiveRecordRelationConnection end end end diff --git a/lib/gitlab/graphql/pagination/relations/offset_active_record_relation.rb b/lib/gitlab/graphql/pagination/relations/offset_active_record_relation.rb deleted file mode 100644 index 2e5a0d66d4e..00000000000 --- a/lib/gitlab/graphql/pagination/relations/offset_active_record_relation.rb +++ /dev/null @@ -1,12 +0,0 @@ -# frozen_string_literal: true - -module Gitlab - module Graphql - module Pagination - module Relations - class OffsetActiveRecordRelation < ::ActiveRecord::Relation - end - end - end - end -end |