Fix topic handling for websocket with namespace

This commit is contained in:
Dane Everitt
2020-04-06 21:22:43 -07:00
parent 222091b68c
commit 33875105b6
3 changed files with 20 additions and 5 deletions

View File

@@ -93,7 +93,7 @@ func (h *Handler) SendJson(v *Message) error {
// If the user does not have permission to see backup events, do not emit
// them over the socket.
if v.Event == server.BackupCompletedEvent {
if strings.HasPrefix(v.Event, server.BackupCompletedEvent) {
if h.JWT != nil && !h.JWT.HasPermission(PermissionReceiveBackups) {
return nil
}