Document undefined permissions to be moved later

This commit is contained in:
Joel Falknau 2025-03-05 14:17:41 +10:00
parent ff989ceb3f
commit c5722411d3
No known key found for this signature in database
6 changed files with 43 additions and 4 deletions

View File

@ -13,6 +13,15 @@ class Fatlink(models.Model):
hash = models.CharField(max_length=254, unique=True) hash = models.CharField(max_length=254, unique=True)
creator = models.ForeignKey(User, on_delete=models.SET(get_sentinel_user)) 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: def __str__(self) -> str:
return self.fleet return self.fleet
@ -26,6 +35,7 @@ class Fat(models.Model):
user = models.ForeignKey(User, on_delete=models.CASCADE) user = models.ForeignKey(User, on_delete=models.CASCADE)
class Meta: class Meta:
default_permissions = ()
unique_together = (("character", "fatlink"),) unique_together = (("character", "fatlink"),)
def __str__(self) -> str: def __str__(self) -> str:

View File

@ -178,7 +178,7 @@ class AuthGroup(models.Model):
("request_groups", _("Can request non-public groups")), ("request_groups", _("Can request non-public groups")),
# Intentionally Commented out # Intentionally Commented out
# AAv0 has these in the Auth_ Content Type # 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 = () default_permissions = ()

View File

@ -29,6 +29,13 @@ class ApplicationForm(models.Model):
questions = SortedManyToManyField(ApplicationQuestion) questions = SortedManyToManyField(ApplicationQuestion)
corp = models.OneToOneField(EveCorporationInfo, on_delete=models.CASCADE) 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: def __str__(self) -> str:
return str(self.corp) return str(self.corp)
@ -45,8 +52,9 @@ class Application(models.Model):
class Meta: class Meta:
permissions = ( permissions = (
('approve_application', 'Can approve applications'), ('reject_application', 'Can reject applications'), ('approve_application', 'Can approve applications'),
('view_apis', 'Can view applicant APIs'),) ('reject_application', 'Can reject applications'),
)
unique_together = ('form', 'user') unique_together = ('form', 'user')
def __str__(self) -> str: def __str__(self) -> str:

View File

@ -58,6 +58,14 @@ class Notification(models.Model):
objects = NotificationManager() 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: def __str__(self) -> str:
return f"{self.user}: {self.title}" return f"{self.user}: {self.title}"

View File

@ -32,6 +32,12 @@ class OpTimer(models.Model):
class Meta: class Meta:
ordering = ["start"] ordering = ["start"]
default_permissions = () 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: def __str__(self) -> str:
return self.operation_name return self.operation_name

View File

@ -6,7 +6,14 @@ class OpenfireUser(models.Model):
username = models.CharField(max_length=254) username = models.CharField(max_length=254)
class Meta: 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: def __str__(self) -> str:
return self.username return self.username