Enable admin automatically if a token is provided.

This commit is contained in:
Mariano Cano 2021-08-02 11:48:37 -07:00
parent 5344f42f21
commit 26122a2cbf

View file

@ -440,7 +440,7 @@ func (a *Authority) init() error {
// TODO: mimick the x509CAService GetCertificateAuthority here too? // 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 // Initialize step-ca Admin Database if it's not already initialized using
// WithAdminDB. // WithAdminDB.
if a.adminDB == nil { if a.adminDB == nil {