mirror of
https://gitlab.com/allianceauth/allianceauth.git
synced 2026-02-09 08:36:23 +01:00
SeAT Manager (#704)
* SeAT service in modular service app format * Replace string concatenation with formatters * Fix incorrect references to user * Fix exception when user doesn't have seat active * Prevent deletion of seat API keys by default * Improve api response error handling * Corrected notification message * Added missing view returns * Update SeAT to use permissions based access * Update password generator to new style * Correct logging message * Fix seat role update tasks * Correct validate user logic * Add seat test settings * Added basic seat unit tests * Added add permissions function from other branch * Remove obsolete settings references
This commit is contained in:
21
services/modules/seat/models.py
Normal file
21
services/modules/seat/models.py
Normal file
@@ -0,0 +1,21 @@
|
||||
from __future__ import unicode_literals
|
||||
from django.utils.encoding import python_2_unicode_compatible
|
||||
from django.contrib.auth.models import User
|
||||
from django.db import models
|
||||
|
||||
|
||||
@python_2_unicode_compatible
|
||||
class SeatUser(models.Model):
|
||||
user = models.OneToOneField(User,
|
||||
primary_key=True,
|
||||
on_delete=models.CASCADE,
|
||||
related_name='seat')
|
||||
username = models.CharField(max_length=254)
|
||||
|
||||
def __str__(self):
|
||||
return self.username
|
||||
|
||||
class Meta:
|
||||
permissions = (
|
||||
("access_seat", u"Can access the SeAT service"),
|
||||
)
|
||||
Reference in New Issue
Block a user