Corrected the checking of permissions for edit and retire. Changed the migration so that view_badge is the correct codename when accessed by perms
The correct permission for retirement was delete not edit. Fixed in the template (the view was already using delete)