admin: add button to disable inactive teams

This commit is contained in:
nemunaire 2019-01-21 02:54:27 +01:00
commit 088c2402cd
4 changed files with 61 additions and 1 deletions

View file

@ -237,6 +237,14 @@ func updateCertificateAssociation(cert fic.Certificate, body []byte) (interface{
if err := os.Symlink(srcLinkPath, dstLinkPath); err != nil {
return nil, err
}
// Mark team as active to ensure it'll be generated
if ut, err := fic.GetTeam(*uc.Team); err != nil {
return nil, err
} else if !ut.Active {
ut.Active = true
ut.Update()
}
} else {
os.Remove(dstLinkPath)
}