Skip to content

Commit

Permalink
Port: Allow Routing to Partial Monthly Client Count From Namespaces (h…
Browse files Browse the repository at this point in the history
…ashicorp#13086)

* add function for routing activity log client counts to ent namespaces

* changelog
  • Loading branch information
HridoyRoy authored and Artem Alexandrov committed Feb 4, 2022
1 parent 1af2df4 commit 4dddfa9
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
@@ -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

0 comments on commit 4dddfa9

Please sign in to comment.