Skip to content

Commit

Permalink
Merge pull request #4906 from FlowFuse/remove-dev-prov-tokens
Browse files Browse the repository at this point in the history
Ensure Device Provisioning tokens removed with Team
  • Loading branch information
knolleary authored Dec 13, 2024
2 parents 1f241e3 + 39fec43 commit d325765
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions forge/db/models/Team.js
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,13 @@ module.exports = {
TeamId: team.id
}
})
// Remove Team's device provisioning tokens
await M.AccessToken.destroy({
where: {
ownerType: 'team',
ownerId: team.id.toString()
}
})
}
}
},
Expand Down

0 comments on commit d325765

Please sign in to comment.