mirror of
https://github.com/ansible/awx.git
synced 2026-01-20 22:18:01 -03:30
20 lines
612 B
Python
20 lines
612 B
Python
# 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):
|
|
"""Enterprise Auth association model"""
|
|
|
|
PROVIDER_CHOICES = (('radius', _('RADIUS')), ('tacacs+', _('TACACS+')), ('saml', _('SAML')))
|
|
|
|
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)
|