Skip to content

Commit 3c983ff

Browse files
committed
component hashes in policy condition
Signed-off-by: Sahiba Mittal <[email protected]>
1 parent 2d203a2 commit 3c983ff

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/views/policy/PolicyCondition.vue

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -206,6 +206,11 @@
206206
name: common.trimToNull(this.coordinatesName),
207207
version: common.trimToNull(this.coordinatesVersion)
208208
});
209+
} else if (this.subject === "COMPONENT_HASH") {
210+
return JSON.stringify({
211+
algorithm: common.trimToNull(this.operator),
212+
value: common.trimToNull(this.value)
213+
});
209214
} else {
210215
return this.value;
211216
}
@@ -220,7 +225,7 @@
220225
this.axios.post(url, {
221226
uuid: this.condition.uuid,
222227
subject: this.subject,
223-
operator: this.operator,
228+
operator: this.subject === 'COMPONENT_HASH' ? 'IS' : this.operator,
224229
value: dynamicValue
225230
}).then((response) => {
226231
this.condition = response.data;

0 commit comments

Comments
 (0)