-
Notifications
You must be signed in to change notification settings - Fork 268
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'feat/tprm' of github.com:intuitem/ciso-assistant-commun…
…ity into feat/tprm
- Loading branch information
Showing
58 changed files
with
27,459 additions
and
4,048 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
187 changes: 187 additions & 0 deletions
187
backend/core/migrations/0025_complianceassessment_folder_riskassessment_folder_and_more.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,187 @@ | ||
# Generated by Django 5.1.1 on 2024-09-12 15:00 | ||
|
||
import django.db.models.deletion | ||
import iam.models | ||
from django.db import migrations, models | ||
|
||
|
||
def set_assessment_folder(apps, schema_editor): | ||
RiskAssessment = apps.get_model("core", "RiskAssessment") | ||
ComplianceAssessment = apps.get_model("core", "ComplianceAssessment") | ||
for risk_assessment in RiskAssessment.objects.all(): | ||
risk_assessment.folder = risk_assessment.project.folder | ||
risk_assessment.save() | ||
for compliance_assessment in ComplianceAssessment.objects.all(): | ||
compliance_assessment.folder = compliance_assessment.project.folder | ||
compliance_assessment.save() | ||
|
||
|
||
class Migration(migrations.Migration): | ||
dependencies = [ | ||
("core", "0024_appliedcontrol_owner"), | ||
("iam", "0006_alter_role_folder_alter_roleassignment_folder_and_more"), | ||
] | ||
|
||
operations = [ | ||
migrations.AddField( | ||
model_name="complianceassessment", | ||
name="folder", | ||
field=models.ForeignKey( | ||
default=iam.models.Folder.get_root_folder_id, | ||
on_delete=django.db.models.deletion.CASCADE, | ||
related_name="%(class)s_folder", | ||
to="iam.folder", | ||
), | ||
), | ||
migrations.AddField( | ||
model_name="riskassessment", | ||
name="folder", | ||
field=models.ForeignKey( | ||
default=iam.models.Folder.get_root_folder_id, | ||
on_delete=django.db.models.deletion.CASCADE, | ||
related_name="%(class)s_folder", | ||
to="iam.folder", | ||
), | ||
), | ||
migrations.AlterField( | ||
model_name="appliedcontrol", | ||
name="folder", | ||
field=models.ForeignKey( | ||
default=iam.models.Folder.get_root_folder_id, | ||
on_delete=django.db.models.deletion.CASCADE, | ||
related_name="%(class)s_folder", | ||
to="iam.folder", | ||
), | ||
), | ||
migrations.AlterField( | ||
model_name="asset", | ||
name="folder", | ||
field=models.ForeignKey( | ||
default=iam.models.Folder.get_root_folder_id, | ||
on_delete=django.db.models.deletion.CASCADE, | ||
related_name="%(class)s_folder", | ||
to="iam.folder", | ||
), | ||
), | ||
migrations.AlterField( | ||
model_name="evidence", | ||
name="folder", | ||
field=models.ForeignKey( | ||
default=iam.models.Folder.get_root_folder_id, | ||
on_delete=django.db.models.deletion.CASCADE, | ||
related_name="%(class)s_folder", | ||
to="iam.folder", | ||
), | ||
), | ||
migrations.AlterField( | ||
model_name="framework", | ||
name="folder", | ||
field=models.ForeignKey( | ||
default=iam.models.Folder.get_root_folder_id, | ||
on_delete=django.db.models.deletion.CASCADE, | ||
related_name="%(class)s_folder", | ||
to="iam.folder", | ||
), | ||
), | ||
migrations.AlterField( | ||
model_name="loadedlibrary", | ||
name="folder", | ||
field=models.ForeignKey( | ||
default=iam.models.Folder.get_root_folder_id, | ||
on_delete=django.db.models.deletion.CASCADE, | ||
related_name="%(class)s_folder", | ||
to="iam.folder", | ||
), | ||
), | ||
migrations.AlterField( | ||
model_name="project", | ||
name="folder", | ||
field=models.ForeignKey( | ||
default=iam.models.Folder.get_root_folder_id, | ||
on_delete=django.db.models.deletion.CASCADE, | ||
related_name="%(class)s_folder", | ||
to="iam.folder", | ||
), | ||
), | ||
migrations.AlterField( | ||
model_name="referencecontrol", | ||
name="folder", | ||
field=models.ForeignKey( | ||
default=iam.models.Folder.get_root_folder_id, | ||
on_delete=django.db.models.deletion.CASCADE, | ||
related_name="%(class)s_folder", | ||
to="iam.folder", | ||
), | ||
), | ||
migrations.AlterField( | ||
model_name="requirementassessment", | ||
name="folder", | ||
field=models.ForeignKey( | ||
default=iam.models.Folder.get_root_folder_id, | ||
on_delete=django.db.models.deletion.CASCADE, | ||
related_name="%(class)s_folder", | ||
to="iam.folder", | ||
), | ||
), | ||
migrations.AlterField( | ||
model_name="requirementmappingset", | ||
name="folder", | ||
field=models.ForeignKey( | ||
default=iam.models.Folder.get_root_folder_id, | ||
on_delete=django.db.models.deletion.CASCADE, | ||
related_name="%(class)s_folder", | ||
to="iam.folder", | ||
), | ||
), | ||
migrations.AlterField( | ||
model_name="requirementnode", | ||
name="folder", | ||
field=models.ForeignKey( | ||
default=iam.models.Folder.get_root_folder_id, | ||
on_delete=django.db.models.deletion.CASCADE, | ||
related_name="%(class)s_folder", | ||
to="iam.folder", | ||
), | ||
), | ||
migrations.AlterField( | ||
model_name="riskacceptance", | ||
name="folder", | ||
field=models.ForeignKey( | ||
default=iam.models.Folder.get_root_folder_id, | ||
on_delete=django.db.models.deletion.CASCADE, | ||
related_name="%(class)s_folder", | ||
to="iam.folder", | ||
), | ||
), | ||
migrations.AlterField( | ||
model_name="riskmatrix", | ||
name="folder", | ||
field=models.ForeignKey( | ||
default=iam.models.Folder.get_root_folder_id, | ||
on_delete=django.db.models.deletion.CASCADE, | ||
related_name="%(class)s_folder", | ||
to="iam.folder", | ||
), | ||
), | ||
migrations.AlterField( | ||
model_name="storedlibrary", | ||
name="folder", | ||
field=models.ForeignKey( | ||
default=iam.models.Folder.get_root_folder_id, | ||
on_delete=django.db.models.deletion.CASCADE, | ||
related_name="%(class)s_folder", | ||
to="iam.folder", | ||
), | ||
), | ||
migrations.AlterField( | ||
model_name="threat", | ||
name="folder", | ||
field=models.ForeignKey( | ||
default=iam.models.Folder.get_root_folder_id, | ||
on_delete=django.db.models.deletion.CASCADE, | ||
related_name="%(class)s_folder", | ||
to="iam.folder", | ||
), | ||
), | ||
migrations.RunPython(set_assessment_folder), | ||
] |
17 changes: 9 additions & 8 deletions
17
..._requirementassessment_answer_and_more.py → ..._requirementassessment_answer_and_more.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,23 @@ | ||
# Generated by Django 5.1 on 2024-09-04 13:56 | ||
# Generated by Django 5.1.1 on 2024-09-13 15:42 | ||
|
||
from django.db import migrations, models | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
("core", "0024_appliedcontrol_owner"), | ||
('core', '0025_complianceassessment_folder_riskassessment_folder_and_more'), | ||
] | ||
|
||
operations = [ | ||
migrations.AddField( | ||
model_name="requirementassessment", | ||
name="answer", | ||
field=models.JSONField(blank=True, null=True, verbose_name="Answer"), | ||
model_name='requirementassessment', | ||
name='answer', | ||
field=models.JSONField(blank=True, null=True, verbose_name='Answer'), | ||
), | ||
migrations.AddField( | ||
model_name="requirementnode", | ||
name="question", | ||
field=models.JSONField(blank=True, null=True, verbose_name="Question"), | ||
model_name='requirementnode', | ||
name='question', | ||
field=models.JSONField(blank=True, null=True, verbose_name='Question'), | ||
), | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.