mirror of
https://github.com/sourcegraph/sourcegraph.git
synced 2026-02-06 17:31:43 +00:00
Cody: Add isCodyEnabled to graphQL schema for Site (#52941)
This commit is contained in:
parent
99b74ac0aa
commit
e4d5317e4f
@ -35,6 +35,7 @@ All notable changes to Sourcegraph are documented in this file.
|
||||
- Batch Changes for Gerrit Code Hosts [#52647](https://github.com/sourcegraph/sourcegraph/pull/52647).
|
||||
- Batch Changes now supports per-batch-change control for pushing to a fork of the upstream repository when the property `changesetTemplate.fork` is specified in the batch spec. [#51572](https://github.com/sourcegraph/sourcegraph/pull/51572)
|
||||
- Executors can now be configured to process multiple queues. [#52016](https://github.com/sourcegraph/sourcegraph/pull/52016)
|
||||
- Added `isCodyEnabled` as a new GraphQL field to `Site`. [#52941](https://github.com/sourcegraph/sourcegraph/pull/52941)
|
||||
|
||||
### Changed
|
||||
|
||||
|
||||
1
cmd/frontend/graphqlbackend/BUILD.bazel
generated
1
cmd/frontend/graphqlbackend/BUILD.bazel
generated
@ -245,6 +245,7 @@ go_library(
|
||||
"//internal/codeintel/dependencies",
|
||||
"//internal/codeintel/dependencies/shared",
|
||||
"//internal/codeintel/resolvers",
|
||||
"//internal/cody",
|
||||
"//internal/conf",
|
||||
"//internal/conf/conftypes",
|
||||
"//internal/conf/deploy",
|
||||
|
||||
@ -7072,6 +7072,11 @@ type Site implements SettingsSubject {
|
||||
Whether users are required to have a verified email in order to access Cody.
|
||||
"""
|
||||
requiresVerifiedEmailForCody: Boolean!
|
||||
|
||||
"""
|
||||
Whether Cody is enabled for this site.
|
||||
"""
|
||||
isCodyEnabled: Boolean!
|
||||
}
|
||||
|
||||
"""
|
||||
|
||||
@ -22,6 +22,7 @@ import (
|
||||
"github.com/sourcegraph/sourcegraph/internal/actor"
|
||||
"github.com/sourcegraph/sourcegraph/internal/api"
|
||||
"github.com/sourcegraph/sourcegraph/internal/auth"
|
||||
"github.com/sourcegraph/sourcegraph/internal/cody"
|
||||
"github.com/sourcegraph/sourcegraph/internal/conf"
|
||||
"github.com/sourcegraph/sourcegraph/internal/conf/deploy"
|
||||
"github.com/sourcegraph/sourcegraph/internal/database"
|
||||
@ -558,3 +559,5 @@ func (r *siteResolver) RequiresVerifiedEmailForCody(ctx context.Context) bool {
|
||||
isAdmin := auth.CheckCurrentUserIsSiteAdmin(ctx, r.db) == nil
|
||||
return !isAdmin
|
||||
}
|
||||
|
||||
func (r *siteResolver) IsCodyEnabled(ctx context.Context) bool { return cody.IsCodyEnabled(ctx) }
|
||||
|
||||
Loading…
Reference in New Issue
Block a user