fix: shorten email permission codenames to fit NetBox action limit

NetBox ObjectPermission actions are limited to 30 characters, so assigning
manage_softwarelicense_email_notifications or
manage_certificate_email_notifications to a group failed validation.
Rename them to manage_license_emails and manage_certificate_emails and
migrate existing auth permissions in place to keep assignments.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
MrBlakeandClaude Opus 5.5 committed 2026-11-04 14:32:23 +01:00
1 parent 5dedfc9206
commit 30d748969f
6 files changed
+56 -8

No files matched your search

+2 -2
View File
@@ -327,7 +327,7 @@ class SoftwareLicense(NetBoxModel, ExpirationNotificationModel):
verbose_name = _("software license")
verbose_name_plural = _("software licenses")
permissions = [
("manage_softwarelicense_email_notifications", _("Can manage license email notifications")),
("manage_license_emails", _("Can manage license email notifications")),
]
def __str__(self):
@@ -459,7 +459,7 @@ class Certificate(NetBoxModel, ExpirationNotificationModel):
verbose_name = _("certificate")
verbose_name_plural = _("certificates")
permissions = [
("manage_certificate_email_notifications", _("Can manage certificate email notifications")),
("manage_certificate_emails", _("Can manage certificate email notifications")),
]
def __str__(self):