Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Port: Allow Routing to Partial Monthly Client Count From Namespaces #13086

Merged
merged 2 commits into from Nov 8, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 3 additions & 0 deletions changelog/13086.txt
@@ -0,0 +1,3 @@
```release-note:bug
activity log (enterprise): allow partial monthly client count to be accessed from namespaces
```
9 changes: 8 additions & 1 deletion vault/logical_system_activity.go
Expand Up @@ -41,7 +41,7 @@ func (b *SystemBackend) activityQueryPath() *framework.Path {
// monthlyActivityCountPath is available in every namespace
func (b *SystemBackend) monthlyActivityCountPath() *framework.Path {
return &framework.Path{
Pattern: "internal/counters/activity/monthly",
Pattern: "internal/counters/activity/monthly$",
HelpSynopsis: strings.TrimSpace(sysHelp["activity-monthly"][0]),
HelpDescription: strings.TrimSpace(sysHelp["activity-monthly"][1]),
Operations: map[logical.Operation]framework.OperationHandler{
Expand All @@ -53,6 +53,13 @@ func (b *SystemBackend) monthlyActivityCountPath() *framework.Path {
}
}

func (b *SystemBackend) activityPaths() []*framework.Path {
return []*framework.Path{
b.monthlyActivityCountPath(),
b.activityQueryPath(),
}
}

// rootActivityPaths are available only in the root namespace
func (b *SystemBackend) rootActivityPaths() []*framework.Path {
return []*framework.Path{
Expand Down