mirror of https://github.com/harness/drone.git
[CODE-617]: Update variable name and merge with main
parent
8f2c1d93ef
commit
084443f81e
|
@ -1,4 +1,4 @@
|
|||
GITNESS_TRACE=true
|
||||
GITNESS_WEBHOOK_ALLOW_LOOPBACK=true
|
||||
GITNESS_PRINCIPAL_ADMIN_PASSWORD=changeit
|
||||
GITNESS_ALLOW_SIGNUP=true
|
||||
GITNESS_ALLOW_SIGN_UP=true
|
|
@ -35,7 +35,7 @@ func (c *registerCommand) run(*kingpin.ParseContext) error {
|
|||
ctx, cancel := context.WithTimeout(context.Background(), time.Minute)
|
||||
defer cancel()
|
||||
|
||||
input := &user.RegisterInput{
|
||||
input := &user.CreateInput{
|
||||
UID: uid,
|
||||
Email: email,
|
||||
DisplayName: displayName,
|
||||
|
|
|
@ -67,7 +67,7 @@ func (c *HTTPClient) Login(ctx context.Context, input *user.LoginInput) (*types.
|
|||
}
|
||||
|
||||
// Register registers a new user and returns a JWT token.
|
||||
func (c *HTTPClient) Register(ctx context.Context, input *user.RegisterInput) (*types.TokenResponse, error) {
|
||||
func (c *HTTPClient) Register(ctx context.Context, input *user.CreateInput) (*types.TokenResponse, error) {
|
||||
out := new(types.TokenResponse)
|
||||
uri := fmt.Sprintf("%s/api/v1/register", c.base)
|
||||
err := c.post(ctx, uri, true, input, out)
|
||||
|
|
|
@ -17,7 +17,7 @@ type Client interface {
|
|||
Login(ctx context.Context, input *user.LoginInput) (*types.TokenResponse, error)
|
||||
|
||||
// Register registers a new user and returns a JWT token.
|
||||
Register(ctx context.Context, input *user.RegisterInput) (*types.TokenResponse, error)
|
||||
Register(ctx context.Context, input *user.CreateInput) (*types.TokenResponse, error)
|
||||
|
||||
// Self returns the currently authenticated user.
|
||||
Self(ctx context.Context) (*types.User, error)
|
||||
|
|
|
@ -24,7 +24,7 @@ func NewController(principalStore store.PrincipalStore, config *types.Config) *C
|
|||
}
|
||||
|
||||
func (c *Controller) IsUserRegistrationAllowed(ctx context.Context) (bool, error) {
|
||||
usrCount, err := c.principalStore.CountUsers(ctx)
|
||||
usrCount, err := c.principalStore.CountUsers(ctx, &types.UserFilter{})
|
||||
if err != nil {
|
||||
return false, err
|
||||
}
|
||||
|
|
|
@ -52,7 +52,7 @@ func (mr *MockClientMockRecorder) Login(arg0, arg1 interface{}) *gomock.Call {
|
|||
}
|
||||
|
||||
// Register mocks base method.
|
||||
func (m *MockClient) Register(arg0 context.Context, arg1 *user.RegisterInput) (*types.TokenResponse, error) {
|
||||
func (m *MockClient) Register(arg0 context.Context, arg1 *user.CreateInput) (*types.TokenResponse, error) {
|
||||
m.ctrl.T.Helper()
|
||||
ret := m.ctrl.Call(m, "Register", arg0, arg1)
|
||||
ret0, _ := ret[0].(*types.TokenResponse)
|
||||
|
|
|
@ -12,13 +12,13 @@ import (
|
|||
type Config struct {
|
||||
// InstanceID specifis the ID of the gitness instance.
|
||||
// NOTE: If the value is not provided the hostname of the machine is used.
|
||||
InstanceID string `envconfig:"GITNESS_INSTANCE_ID"`
|
||||
Debug bool `envconfig:"GITNESS_DEBUG"`
|
||||
Trace bool `envconfig:"GITNESS_TRACE"`// GracefulShutdownTime defines the max time we wait when shutting down a server.
|
||||
InstanceID string `envconfig:"GITNESS_INSTANCE_ID"`
|
||||
Debug bool `envconfig:"GITNESS_DEBUG"`
|
||||
Trace bool `envconfig:"GITNESS_TRACE"` // GracefulShutdownTime defines the max time we wait when shutting down a server.
|
||||
// 5min should be enough for most git clones to complete.
|
||||
GracefulShutdownTime time.Duration `envconfig:"GITNESS_GRACEFUL_SHUTDOWN_TIME" default:"300s"`
|
||||
|
||||
AllowSignUp bool `envconfig:"GITNESS_ALLOW_SIGNUP"`
|
||||
AllowSignUp bool `envconfig:"GITNESS_ALLOW_SIGN_UP"`
|
||||
|
||||
Profiler struct {
|
||||
Type string `envconfig:"GITNESS_PROFILER_TYPE"`
|
||||
|
|
Loading…
Reference in New Issue