Skip to content
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

Conversation

gtanzillo
Copy link
Member

@gtanzillo 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

@gtanzillo gtanzillo force-pushed the fix-tag-expression-on-not-taggable-class branch from c2be27d to eaf4ad6 Compare October 19, 2018 20:19
Copy link
Member

@jrafanie jrafanie left a comment

Choose a reason for hiding this comment

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

LGTM, I'd like @kbrock's 👍

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
@gtanzillo gtanzillo force-pushed the fix-tag-expression-on-not-taggable-class branch from eaf4ad6 to ed5fbff Compare October 19, 2018 21:19
@miq-bot
Copy link
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. 👍

Copy link
Contributor

@lpichler lpichler left a comment

Choose a reason for hiding this comment

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

👍

Copy link
Member

@kbrock kbrock left a comment

Choose a reason for hiding this comment

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

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 added this to the Sprint 97 Ending Oct 22, 2018 milestone Oct 22, 2018
@jrafanie jrafanie merged commit 6fa29c2 into ManageIQ:master Oct 22, 2018
@jrafanie
Copy link
Member

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

@gtanzillo
Copy link
Member Author

@jrafanie 👍

simaishi pushed a commit that referenced this pull request Oct 22, 2018
…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
Copy link
Contributor

Gaprindashvili backport details:

$ git log -1
commit 256263f4d31da72725f0aaa7362ac55f7c5b12a0
Author: Joe Rafaniello <[email protected]>
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 pushed a commit that referenced this pull request Oct 22, 2018
…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
Copy link
Contributor

Hammer backport details:

$ git log -1
commit 371a21f17a26376ccd8e473b645f8988ed61c5f1
Author: Joe Rafaniello <[email protected]>
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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants