Selaa lähdekoodia

Enable admin automatically if a token is provided.

Mariano Cano 5 vuotta sitten
vanhempi
sitoutus
26122a2cbf
1 muutettua tiedostoa jossa 1 lisäystä ja 1 poistoa
  1. 1 1
      authority/authority.go

+ 1 - 1
authority/authority.go

@@ -440,7 +440,7 @@ func (a *Authority) init() error {
 		// TODO: mimick the x509CAService GetCertificateAuthority here too?
 	}
 
-	if a.config.AuthorityConfig.EnableAdmin {
+	if a.config.AuthorityConfig.EnableAdmin || a.linkedCAToken != "" {
 		// Initialize step-ca Admin Database if it's not already initialized using
 		// WithAdminDB.
 		if a.adminDB == nil {