Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,5 @@ charts/custom-values.yaml
**/charts/*/charts
charts/ciso-assistant-next/custom.yaml
.history/
__pycache__
__pycache__
.idea
19 changes: 19 additions & 0 deletions backend/iam/migrations/0015_folder_ref_id.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# Generated by Django 5.2.6 on 2025-09-23 10:22

from django.db import migrations, models


class Migration(migrations.Migration):
dependencies = [
("iam", "0014_user_observation"),
]

operations = [
migrations.AddField(
model_name="folder",
name="ref_id",
field=models.CharField(
blank=True, max_length=100, null=True, verbose_name="reference ID"
),
),
]
5 changes: 5 additions & 0 deletions backend/iam/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,11 @@ class ContentType(models.TextChoices):
verbose_name=_("parent folder"),
default=_get_root_folder,
)

ref_id = models.CharField(
max_length=100, blank=True, null=True, verbose_name=_("reference ID")
)

builtin = models.BooleanField(default=False)

fields_to_check = ["name"]
Expand Down
3 changes: 3 additions & 0 deletions frontend/src/lib/components/Forms/ModelForm/FolderForm.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import FileInput from '../FileInput.svelte';
import Checkbox from '../Checkbox.svelte';
import type { CacheLock, ModelInfo } from '$lib/utils/types';
import TextField from '../TextField.svelte';

// Props unused but referenced to avoid browser warnings because they're needed for enterprise Folderform

Expand All @@ -29,6 +30,8 @@
}: Props = $props();
</script>

<TextField {form} field="ref_id" label={m.refId()} />

{#if importFolder}
<FileInput
{form}
Expand Down
4 changes: 2 additions & 2 deletions frontend/src/lib/utils/table.ts
Original file line number Diff line number Diff line change
Expand Up @@ -933,8 +933,8 @@ const EVIDENCE_OWNER_FILTER: ListViewFilterConfig = {

export const listViewFields = {
folders: {
head: ['name', 'description', 'parentDomain'],
body: ['name', 'description', 'parent_folder']
head: ['ref_id', 'name', 'description', 'parentDomain'],
body: ['ref_id', 'name', 'description', 'parent_folder']
},
perimeters: {
head: ['ref_id', 'name', 'description', 'defaultAssignee', 'domain'],
Expand Down
Loading