Skip to content
Snippets Groups Projects
Unverified Commit 5c0800ac authored by John Swanson's avatar John Swanson Committed by GitHub
Browse files

Don't allow viewing a timeline without coll perms (#46863)

If we don't have access to the collection, we shouldn't have access to
the timelines.
parent 35d73f95
No related branches found
No related tags found
No related merge requests found
......@@ -1115,6 +1115,7 @@
[include archived]
{include [:maybe [:= "events"]]
archived [:maybe :boolean]}
(api/read-check collection/root-collection)
(timeline/timelines-for-collection nil {:timeline/events? (= include "events")
:timeline/archived? archived}))
......@@ -1124,6 +1125,7 @@
{id ms/PositiveInt
include [:maybe [:= "events"]]
archived [:maybe :boolean]}
(api/read-check (t2/select-one :model/Collection :id id))
(timeline/timelines-for-collection id {:timeline/events? (= include "events")
:timeline/archived? archived}))
......
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