mirror of
https://github.com/cisagov/manage.get.gov.git
synced 2025-07-05 10:43:23 +02:00
Add UserDomainRole table and helpers
This commit is contained in:
parent
22eb49c004
commit
49b4f078e8
9 changed files with 211 additions and 7 deletions
|
@ -1,4 +1,5 @@
|
|||
from django.contrib.auth.models import AbstractUser
|
||||
from django.db import models
|
||||
|
||||
|
||||
class User(AbstractUser):
|
||||
|
@ -7,6 +8,12 @@ class User(AbstractUser):
|
|||
but can be customized later.
|
||||
"""
|
||||
|
||||
domains = models.ManyToManyField(
|
||||
"registrar.Domain",
|
||||
through="registrar.UserDomainRole",
|
||||
related_name="users",
|
||||
)
|
||||
|
||||
def __str__(self):
|
||||
# this info is pulled from Login.gov
|
||||
if self.first_name or self.last_name:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue