Skip to content

Commit

Permalink
fix for panic
Browse files Browse the repository at this point in the history
  • Loading branch information
gregns1 committed Jul 16, 2024
1 parent ac30ee1 commit c417d1d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion rest/admin_api.go
Original file line number Diff line number Diff line change
Expand Up @@ -1622,7 +1622,7 @@ func getAuditEventAccess(db *db.Database, princ auth.Principal) map[string]map[s
// we support specifying both collection access and legacy way for default collection, if there are some channels
// specified for default collection in legacy way, add them here
defaultChannels := princ.ExplicitChannels().AsSet().ToArray()
if len(auditEventAccess[base.DefaultScope][base.DefaultCollection]) == 0 {
if len(auditEventAccess[base.DefaultScope][base.DefaultCollection]) == 0 && db.HasDefaultCollection() {
auditEventAccess[base.DefaultScope][base.DefaultCollection] = defaultChannels
}
}
Expand Down

0 comments on commit c417d1d

Please sign in to comment.