Skip to content
Snippets Groups Projects
Commit e12a5f56 authored by Cam Saül's avatar Cam Saül
Browse files

Filter out fields you're not allowed to see when hydrating :target

parent 8eac9dd5
No related branches found
No related tags found
No related merge requests found
......@@ -106,7 +106,7 @@
(:fk_target_field_id field))]
(:fk_target_field_id field)))
id->target-field (u/key-by :id (when (seq target-field-ids)
(db/select Field :id [:in target-field-ids])))]
(filter i/can-read? (db/select Field :id [:in target-field-ids]))))]
(for [field fields
:let [target-id (:fk_target_field_id field)]]
(assoc field :target (id->target-field target-id)))))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment