Skip to content

Conversation

danielpacak
Copy link
Contributor

Resolves: #63

Resolves: #63

Signed-off-by: Daniel Pacak <pacak.daniel@gmail.com>
@danielpacak danielpacak requested a review from knqyf263 February 20, 2020 11:49
@codecov-io
Copy link

Codecov Report

Merging #68 into master will increase coverage by 0.15%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff            @@
##           master     #68      +/-   ##
=========================================
+ Coverage   70.64%   70.8%   +0.15%     
=========================================
  Files           5       5              
  Lines         385     387       +2     
=========================================
+ Hits          272     274       +2     
  Misses         98      98              
  Partials       15      15
Impacted Files Coverage Δ
pkg/cmd/resource_resolver.go 85.13% <100%> (+0.41%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 3b55776...3ee46c2. Read the comment docs.

@@ -143,6 +143,9 @@ func (rv *resourceResolver) isVerbSupportedBy(verb string, resource apismeta.API
if verb == rbac.VerbAll {
return true
}
if resource.Name == "podsecuritypolicies" && verb == "use" {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: If we support any other special verbs in the future, we can write this like the following.

    specials = []schema.XXX{        
          {
              Group:    "extensions",
              Resource: "podsecuritypolicies",
              Verb: "use",
          },
      }
for _, s := range specials {     
    if resource.Name ==  s.Resource && verb == s.Verb {
        return true
    }
}

@danielpacak danielpacak merged commit f78ee94 into aquasecurity:master Feb 20, 2020
@danielpacak danielpacak deleted the fix/issue_64/use_psps branch February 20, 2020 12:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Who can use podsecuritypolicy
3 participants