mirror of
https://github.com/ZwareBear/awx.git
synced 2026-04-10 10:01:48 -05:00
add database column to main_project table
add new column to `main_project` table - `signature_validation` - `signature_validation_credential` TODO: update awx_collection Signed-off-by: Hao Liu <haoli@redhat.com> Co-Authored-By: Lila Yasin <89486372+djyasin@users.noreply.github.com>
This commit is contained in:
@@ -1473,6 +1473,8 @@ class ProjectSerializer(UnifiedJobTemplateSerializer, ProjectOptionsSerializer):
|
||||
) + (
|
||||
'last_update_failed',
|
||||
'last_updated',
|
||||
'signature_validation',
|
||||
'signature_validation_credential',
|
||||
) # Backwards compatibility
|
||||
read_only_fields = ('*', 'custom_virtualenv')
|
||||
|
||||
|
||||
@@ -0,0 +1,31 @@
|
||||
# Generated by Django 3.2.13 on 2022-07-20 17:46
|
||||
|
||||
from django.db import migrations, models
|
||||
import django.db.models.deletion
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('main', '0164_remove_inventorysource_update_on_project_update'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AddField(
|
||||
model_name='project',
|
||||
name='signature_validation',
|
||||
field=models.BooleanField(default=False, help_text='Enable signature validation.'),
|
||||
),
|
||||
migrations.AddField(
|
||||
model_name='project',
|
||||
name='signature_validation_credential',
|
||||
field=models.ForeignKey(
|
||||
blank=True,
|
||||
default=None,
|
||||
null=True,
|
||||
on_delete=django.db.models.deletion.SET_NULL,
|
||||
related_name='projects_signature_validation',
|
||||
to='main.credential',
|
||||
),
|
||||
),
|
||||
]
|
||||
@@ -284,6 +284,21 @@ class Project(UnifiedJobTemplate, ProjectOptions, ResourceMixin, CustomVirtualEn
|
||||
help_text=_('Allow changing the SCM branch or revision in a job template ' 'that uses this project.'),
|
||||
)
|
||||
|
||||
# indicate if content signature validation is enabled
|
||||
signature_validation = models.BooleanField(
|
||||
default=False,
|
||||
help_text=_('Enable signature validation.'),
|
||||
)
|
||||
# credential (keys) used to validate content signature
|
||||
signature_validation_credential = models.ForeignKey(
|
||||
'Credential',
|
||||
related_name='%(class)ss_signature_validation',
|
||||
blank=True,
|
||||
null=True,
|
||||
default=None,
|
||||
on_delete=models.SET_NULL,
|
||||
)
|
||||
|
||||
scm_revision = models.CharField(
|
||||
max_length=1024,
|
||||
blank=True,
|
||||
|
||||
Reference in New Issue
Block a user