diff --git a/allianceauth/fleetactivitytracking/models.py b/allianceauth/fleetactivitytracking/models.py index d12836e1..62b474b8 100644 --- a/allianceauth/fleetactivitytracking/models.py +++ b/allianceauth/fleetactivitytracking/models.py @@ -13,6 +13,15 @@ class Fatlink(models.Model): hash = models.CharField(max_length=254, unique=True) creator = models.ForeignKey(User, on_delete=models.SET(get_sentinel_user)) + class Meta: + default_permissions = () + permissions = ( + # Intentionally Commented out + # AAv0 has these in the Auth_ Content Type + # ('fleetactivitytracking', 'fleetactivitytracking'), + # ('fleetactivitytracking_statistics', 'fleetactivitytracking_statistics'), + ) + def __str__(self) -> str: return self.fleet @@ -26,6 +35,7 @@ class Fat(models.Model): user = models.ForeignKey(User, on_delete=models.CASCADE) class Meta: + default_permissions = () unique_together = (("character", "fatlink"),) def __str__(self) -> str: diff --git a/allianceauth/groupmanagement/models.py b/allianceauth/groupmanagement/models.py index ce37ae34..b1df1b5e 100644 --- a/allianceauth/groupmanagement/models.py +++ b/allianceauth/groupmanagement/models.py @@ -178,7 +178,7 @@ class AuthGroup(models.Model): ("request_groups", _("Can request non-public groups")), # Intentionally Commented out # AAv0 has these in the Auth_ Content Type - # ('auth.group_management', 'Can Approve and Deny all Group Requests, Can view and manage all group memberships')) + # ('group_management', 'group_management')) ) default_permissions = () diff --git a/allianceauth/hrapplications/models.py b/allianceauth/hrapplications/models.py index d9251d89..b900fb40 100644 --- a/allianceauth/hrapplications/models.py +++ b/allianceauth/hrapplications/models.py @@ -29,6 +29,13 @@ class ApplicationForm(models.Model): questions = SortedManyToManyField(ApplicationQuestion) corp = models.OneToOneField(EveCorporationInfo, on_delete=models.CASCADE) + class Meta: + permissions = ( + # Intentionally Commented out + # AAv0 has these in the Auth_ Content Type + # ('human_resources', 'human_resources')) + ) + def __str__(self) -> str: return str(self.corp) @@ -45,8 +52,9 @@ class Application(models.Model): class Meta: permissions = ( - ('approve_application', 'Can approve applications'), ('reject_application', 'Can reject applications'), - ('view_apis', 'Can view applicant APIs'),) + ('approve_application', 'Can approve applications'), + ('reject_application', 'Can reject applications'), + ) unique_together = ('form', 'user') def __str__(self) -> str: diff --git a/allianceauth/notifications/models.py b/allianceauth/notifications/models.py index 28688b99..51e06401 100644 --- a/allianceauth/notifications/models.py +++ b/allianceauth/notifications/models.py @@ -58,6 +58,14 @@ class Notification(models.Model): objects = NotificationManager() + class Meta: + default_permissions = () + permissions = ( + # Intentionally Commented out + # AAv0 has these in the Auth_ Content Type + # ('logging_notifications', 'logging_notifications') + ) + def __str__(self) -> str: return f"{self.user}: {self.title}" diff --git a/allianceauth/optimer/models.py b/allianceauth/optimer/models.py index 8b9bb5f0..cc447285 100644 --- a/allianceauth/optimer/models.py +++ b/allianceauth/optimer/models.py @@ -32,6 +32,12 @@ class OpTimer(models.Model): class Meta: ordering = ["start"] default_permissions = () + # Intentionally Commented out + # AAv0 has these in the Auth_ Content Type + # permissions = ( + # ('optimer_view', 'optimer_view'), + # ('optimer_management', 'optimer_management'), + # ) def __str__(self) -> str: return self.operation_name diff --git a/allianceauth/services/modules/openfire/models.py b/allianceauth/services/modules/openfire/models.py index 562282b5..d676a225 100644 --- a/allianceauth/services/modules/openfire/models.py +++ b/allianceauth/services/modules/openfire/models.py @@ -6,7 +6,14 @@ class OpenfireUser(models.Model): username = models.CharField(max_length=254) class Meta: - permissions = (("access_openfire", "Can access the Openfire service"),) + default_permissions = () + permissions = ( + ("access_openfire", "Can access the Openfire service"), + # Intentionally Commented out + # AAv0 has these in the Auth_ Content Type + # ('jabber_broadcast', 'jabber_broadcast'), + # ('jabber_broadcast_all', 'jabber_broadcast_all'), + ) def __str__(self) -> str: return self.username