mirror of
https://github.com/ansible/awx.git
synced 2026-05-19 14:57:39 -02:30
Add ReceptorAddress to root urls
- Add database contraints to make sure addresses are unique If port is defined: address, port, protocol, websocket_path are unique together if port is not defined: address, protocol, websocket_path are unique together - Allow deleting address via API - Add ReceptorAddressAccess to determine permissions - awx-manage add_receptor_address returns changed: True if successful
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
# Generated by Django 4.2.5 on 2023-10-03 18:31
|
||||
# Generated by Django 4.2.5 on 2023-10-04 06:51
|
||||
|
||||
from django.db import migrations, models
|
||||
import django.db.models.deletion
|
||||
@@ -22,4 +22,22 @@ class Migration(migrations.Migration):
|
||||
('instance', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='receptor_addresses', to='main.instance')),
|
||||
],
|
||||
),
|
||||
migrations.AddConstraint(
|
||||
model_name='receptoraddress',
|
||||
constraint=models.UniqueConstraint(
|
||||
condition=models.Q(('port', None)),
|
||||
fields=('address', 'protocol', 'websocket_path'),
|
||||
name='unique_receptor_address_no_port',
|
||||
violation_error_message='Receptor address must be unique.',
|
||||
),
|
||||
),
|
||||
migrations.AddConstraint(
|
||||
model_name='receptoraddress',
|
||||
constraint=models.UniqueConstraint(
|
||||
condition=models.Q(('port', None), _negated=True),
|
||||
fields=('address', 'port', 'protocol', 'websocket_path'),
|
||||
name='unique_receptor_address_with_port',
|
||||
violation_error_message='Receptor address must be unique.',
|
||||
),
|
||||
),
|
||||
]
|
||||
|
||||
Reference in New Issue
Block a user