Commit Graph
2 Commits
Author SHA1 Message Date
Nic Boet bf745f2b8c fix: let a Snapshots grant view the events held in a snapshot
Event::canView() looked an event up in Snapshot_Events, a table that
doesn't exist (it is Snapshots_Events), and passed the event id as
dbFetchOne()'s column argument, so the id was never bound. The query
failed every time and a user allowed only through Snapshots could not
view the events in a snapshot. Check the role's Snapshots level as well
as the user's own, like the Events check above it.

The monitor check before it is unchanged.

refs #5189
2026-10-21 19:06:25 -05:00
Nic Boet 1a8964d066 fix: count the user's role in Event::canView() and canEdit()
Event::canView() and canEdit() compared the user's own Events field, so a
user whose own Events was None but whose role granted Events=View or Edit
could not view or edit any event, while the global canView('Events') and
canEdit('Events') let them through to the page. Use ZM\User::canView() and
canEdit(), which read the role as well. The monitor check is unchanged.

refs #5189
2026-10-21 19:06:25 -05:00