Skip to content

Commit

Permalink
fix condition
Browse files Browse the repository at this point in the history
  • Loading branch information
pasha-codefresh committed Jul 12, 2023
1 parent b0480cb commit 8d2e085
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions server/application/application.go
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@ func (s *Server) List(ctx context.Context, q *application.ApplicationQuery) (*ap
for _, a := range filteredApps {
// Skip any application that is neither in the control plane's namespace
// nor in the list of enabled namespaces.
if s.isNamespaceEnabled(a.Namespace) {
if !s.isNamespaceEnabled(a.Namespace) {
continue
}
if s.enf.Enforce(ctx.Value("claims"), rbacpolicy.ResourceApplications, rbacpolicy.ActionGet, a.RBACName(s.ns)) {
Expand Down Expand Up @@ -1023,7 +1023,7 @@ func (s *Server) Watch(q *application.ApplicationQuery, ws application.Applicati
return
}

if s.isNamespaceEnabled(a.Namespace) {
if !s.isNamespaceEnabled(a.Namespace) {
return
}

Expand Down

0 comments on commit 8d2e085

Please sign in to comment.