admin: new route and interface to manage symlink for team association exclusing certificates

This commit is contained in:
nemunaire 2019-02-04 19:59:29 +01:00
parent 2b95995104
commit 14d31737e0
6 changed files with 132 additions and 21 deletions

View file

@ -180,7 +180,13 @@ func disableInactiveTeams(_ httprouter.Params, _ []byte) (interface{}, error) {
return nil, err
}
if len(serials) == 0 {
var assocs []string
assocs, err = pki.GetTeamAssociations(TeamsDir, team.Id)
if err != nil {
return nil, err
}
if len(serials) == 0 && len(assocs) == 0 {
if team.Active {
team.Active = false
team.Update()