Skip to content
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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions pkg/authorization/registry/clusterpolicy/registry.go
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,9 @@ func NewSimulatedRegistry(clusterRegistry Registry) policy.Registry {

func (s *simulatedStorage) ListPolicies(ctx apirequest.Context, options *metainternal.ListOptions) (*authorizationapi.PolicyList, error) {
ret, err := s.clusterRegistry.ListClusterPolicies(ctx, options)
if err != nil {
return nil, err
}
return authorizationapi.ToPolicyList(ret), err
}

Expand All @@ -113,6 +116,9 @@ func (s *simulatedStorage) UpdatePolicy(ctx apirequest.Context, policy *authoriz

func (s *simulatedStorage) GetPolicy(ctx apirequest.Context, name string, options *metav1.GetOptions) (*authorizationapi.Policy, error) {
ret, err := s.clusterRegistry.GetClusterPolicy(ctx, name, options)
if err != nil {
return nil, err
}
return authorizationapi.ToPolicy(ret), err
}

Expand Down
6 changes: 6 additions & 0 deletions pkg/authorization/registry/clusterpolicybinding/registry.go
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,9 @@ func NewSimulatedRegistry(clusterRegistry Registry) policybinding.Registry {

func (s *simulatedStorage) ListPolicyBindings(ctx apirequest.Context, options *metainternal.ListOptions) (*authorizationapi.PolicyBindingList, error) {
ret, err := s.clusterRegistry.ListClusterPolicyBindings(ctx, options)
if err != nil {
return nil, err
}
return authorizationapi.ToPolicyBindingList(ret), err
}

Expand All @@ -113,6 +116,9 @@ func (s *simulatedStorage) UpdatePolicyBinding(ctx apirequest.Context, policyBin

func (s *simulatedStorage) GetPolicyBinding(ctx apirequest.Context, name string, options *metav1.GetOptions) (*authorizationapi.PolicyBinding, error) {
ret, err := s.clusterRegistry.GetClusterPolicyBinding(ctx, name, options)
if err != nil {
return nil, err
}
return authorizationapi.ToPolicyBinding(ret), err
}

Expand Down