mirror of
https://github.com/ansible/awx.git
synced 2026-03-07 11:41:08 -03:30
Introduce sso UserEnterpriseAuth model.
This commit is contained in:
@@ -1,2 +1,26 @@
|
||||
# Copyright (c) 2015 Ansible, Inc.
|
||||
# All Rights Reserved.
|
||||
|
||||
# Django
|
||||
from django.db import models
|
||||
from django.contrib.auth.models import User
|
||||
from django.utils.translation import ugettext_lazy as _
|
||||
|
||||
|
||||
class UserEnterpriseAuth(models.Model):
|
||||
"""Tower Enterprise Auth association model"""
|
||||
|
||||
PROVIDER_CHOICES = (
|
||||
('radius', _('RADIUS')),
|
||||
('tacacs+', _('TACACS+')),
|
||||
)
|
||||
|
||||
class Meta:
|
||||
unique_together = ('user', 'provider')
|
||||
|
||||
user = models.ForeignKey(
|
||||
User, related_name='enterprise_auth', on_delete=models.CASCADE
|
||||
)
|
||||
provider = models.CharField(
|
||||
max_length=32, choices=PROVIDER_CHOICES
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user