Skip to content

Commit

Permalink
Backport: Allow Routing to Partial Monthly Client Count From Namespac…
Browse files Browse the repository at this point in the history
…es (#13089)

* changelog

* add function for routing activity log client counts to ent namespaces
  • Loading branch information
Hridoy Roy authored Nov 9, 2021
1 parent 5038e92 commit 8aeba3a
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
3 changes: 3 additions & 0 deletions changelog/13086.txt
Original file line number Diff line number Diff line change
@@ -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
Original file line number Diff line number Diff line change
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

0 comments on commit 8aeba3a

Please sign in to comment.