mirror of
https://github.com/nikdoof/test-auth.git
synced 2025-12-14 06:42:16 +00:00
Added meta information for SSO models
This commit is contained in:
@@ -128,6 +128,11 @@ class SSOUserNote(models.Model):
|
||||
verbose_name="Date/Time the note was added",
|
||||
help_text="Shows the date and time the note was added to the account")
|
||||
|
||||
class Meta:
|
||||
verbose_name = 'User Note'
|
||||
verbose_name_plural = 'User Notes'
|
||||
ordering = ['date_created']
|
||||
|
||||
|
||||
class Service(models.Model):
|
||||
"""
|
||||
@@ -142,6 +147,11 @@ class Service(models.Model):
|
||||
groups = models.ManyToManyField(Group, blank=False)
|
||||
settings_json = JSONField("Service Settings", blank=True)
|
||||
|
||||
class Meta:
|
||||
verbose_name = 'Service'
|
||||
verbose_name_plural = 'Services'
|
||||
ordering = ['id']
|
||||
|
||||
@property
|
||||
def provide_login(self):
|
||||
return self.settings['provide_login']
|
||||
@@ -197,6 +207,11 @@ class ServiceAccount(models.Model):
|
||||
username = None
|
||||
password = None
|
||||
|
||||
class Meta:
|
||||
verbose_name = 'Service Account'
|
||||
verbose_name_plural = 'Service Accounts'
|
||||
ordering = ['user']
|
||||
|
||||
def __str__(self):
|
||||
return "%s: %s (%s)" % (self.service.name, self.user.username, self.service_uid)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user