Skip to content

Commit

Permalink
Display folder field in evidence when creating from it from an applie…
Browse files Browse the repository at this point in the history
…d control

As an applied control may be global, inheriting its domain may cause errors if
the user attempting to create an evidence inside it may not have the permission
to create an evidence in the global domain.
  • Loading branch information
nas-tabchiche committed Oct 17, 2024
1 parent 09acb73 commit b233777
Showing 1 changed file with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,15 +27,14 @@
field="attachment"
label={m.attachment()}
/>
{#if !(initialData.applied_controls || initialData.requirement_assessments)}
{#if !initialData.requirement_assessments}
<AutocompleteSelect
{form}
options={getOptions({ objects: model.foreignKeys['folder'] })}
field="folder"
cacheLock={cacheLocks['folder']}
bind:cachedValue={formDataCache['folder']}
label={m.domain()}
hidden={initialData.applied_controls || initialData.requirement_assessments}
/>
{:else}
<HiddenInput {form} field="folder" />
Expand Down

0 comments on commit b233777

Please sign in to comment.