New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Check if class is taggable before attempting to process tag expression #18114

Merged
merged 1 commit into from Oct 22, 2018

Conversation

@gtanzillo
Member

gtanzillo commented Oct 19, 2018

This eliminates an error being raised when a tag expression was used in RBAC and is
applied to a class that is not taggable

Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1641012.

/cc @jrafanie @kbrock @lpichler

@jrafanie

LGTM, I'd like @kbrock's 👍

Check if class is taggable before attempting to process tag expression
This eliminates an error being raised when a tag expression was used in RBAC and is
applied to a class that is not taggable

Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1641012
@miq-bot

This comment has been minimized.

Member

miq-bot commented Oct 19, 2018

Checked commit gtanzillo@ed5fbff with ruby 2.3.3, rubocop 0.52.1, haml-lint 0.20.0, and yamllint 1.10.0
2 files checked, 0 offenses detected
Everything looks fine. 👍

@lpichler

👍

@kbrock

kbrock approved these changes Oct 22, 2018 edited

Good stuff.

My knee jerk is to convert the return nil to return klass.none but I think we should make as little change as possible.

(then again, my next reaction is to make the object taggable - but alas, not possible)

So yes, :shipit:

@jrafanie jrafanie self-assigned this Oct 22, 2018

@jrafanie jrafanie merged commit 6fa29c2 into ManageIQ:master Oct 22, 2018

2 checks passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
coverage/coveralls Coverage increased (+0.2%) to 73.205%
Details
@jrafanie

This comment has been minimized.

Member

jrafanie commented Oct 22, 2018

@gtanzillo I added gap and hammer, that should be ok, right?

@gtanzillo

This comment has been minimized.

Member

gtanzillo commented Oct 22, 2018

@jrafanie 👍

@simaishi simaishi added the blocker label Oct 22, 2018

simaishi added a commit that referenced this pull request Oct 22, 2018

Merge pull request #18114 from gtanzillo/fix-tag-expression-on-not-ta…
…ggable-class

Check if class is taggable before attempting to process tag expression

(cherry picked from commit 6fa29c2)

Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1641810
@simaishi

This comment has been minimized.

Contributor

simaishi commented Oct 22, 2018

Gaprindashvili backport details:

$ git log -1
commit 256263f4d31da72725f0aaa7362ac55f7c5b12a0
Author: Joe Rafaniello <jrafanie@users.noreply.github.com>
Date:   Mon Oct 22 11:26:24 2018 -0400

    Merge pull request #18114 from gtanzillo/fix-tag-expression-on-not-taggable-class
    
    Check if class is taggable before attempting to process tag expression
    
    (cherry picked from commit 6fa29c26a8dbb3c8935dfc4d521b6971073d3655)
    
    Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1641810

simaishi added a commit that referenced this pull request Oct 22, 2018

Merge pull request #18114 from gtanzillo/fix-tag-expression-on-not-ta…
…ggable-class

Check if class is taggable before attempting to process tag expression

(cherry picked from commit 6fa29c2)

Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1641012
@simaishi

This comment has been minimized.

Contributor

simaishi commented Oct 22, 2018

Hammer backport details:

$ git log -1
commit 371a21f17a26376ccd8e473b645f8988ed61c5f1
Author: Joe Rafaniello <jrafanie@users.noreply.github.com>
Date:   Mon Oct 22 11:26:24 2018 -0400

    Merge pull request #18114 from gtanzillo/fix-tag-expression-on-not-taggable-class
    
    Check if class is taggable before attempting to process tag expression
    
    (cherry picked from commit 6fa29c26a8dbb3c8935dfc4d521b6971073d3655)
    
    Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1641012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment