Skip to content

Commit

Permalink
Refs 2190: adding enabled check to accessible (#457)
Browse files Browse the repository at this point in the history
* adding check to accessible, if not enabled it should also not be accessible

* reorg
  • Loading branch information
xbhouse authored Nov 2, 2023
1 parent ea767e7 commit d8a0e24
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions pkg/handler/features.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,9 @@ func (fh *FeaturesHandler) listFeatures(c echo.Context) error {
}

func accessible(ctx context.Context, feature config.Feature) bool {
if !feature.Enabled {
return false
}
if feature.Accounts == nil && feature.Users == nil {
return true
}
Expand Down

0 comments on commit d8a0e24

Please sign in to comment.