policy check for panels and dashboards don't handle nested policy rules

Bug #1643074 reported by David Lyle
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Dashboard (Horizon)
Fix Released
High
David Lyle

Bug Description

The policy_rules property on Panel and Dashboard is intended to handle nested policy rules, where the top level rules are OR'd and the lower level is AND'd. Currently regardless of what is passed in, it's wrapped in another list. There should be a check that policy_rules is not already a list.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to horizon (master)

Fix proposed to branch: master
Review: https://review.openstack.org/399786

Changed in horizon:
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to horizon (master)

Reviewed: https://review.openstack.org/399786
Committed: https://git.openstack.org/cgit/openstack/horizon/commit/?id=43e9df85ab286ddee96e9cff97f551781baf70d1
Submitter: Jenkins
Branch: master

commit 43e9df85ab286ddee96e9cff97f551781baf70d1
Author: David Lyle <email address hidden>
Date: Fri Nov 18 15:02:20 2016 -0700

    Rework hardcoded policy in admin dash

    Since the content in a Dashboard is not hardcoded, having hardcoded
    policy checks to specific services at the dashboard level is wrong.
    The Dashboard was designed to evaluate all panels to determine policy
    so this type of thing could be avoided. This patch moves the content
    specific policy checks to the panels where they apply.

    Additionally, this fix uncovered another bug where policy_rules are
    wrapped in a list regardless of format. This patch adds a check and
    only wraps where necessary.

    Change-Id: I79314a45c3c552ebcb3bb7cc881c2467fa009c5d
    Closes-Bug: #1643013
    Closes-Bug: #1643074

Changed in horizon:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to horizon (stable/newton)

Fix proposed to branch: stable/newton
Review: https://review.openstack.org/407121

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to horizon (stable/newton)

Reviewed: https://review.openstack.org/407121
Committed: https://git.openstack.org/cgit/openstack/horizon/commit/?id=51a039e4616d9e6b3c953122ba357792ea3886a4
Submitter: Jenkins
Branch: stable/newton

commit 51a039e4616d9e6b3c953122ba357792ea3886a4
Author: David Lyle <email address hidden>
Date: Fri Nov 18 15:02:20 2016 -0700

    Rework hardcoded policy in admin dash

    Since the content in a Dashboard is not hardcoded, having hardcoded
    policy checks to specific services at the dashboard level is wrong.
    The Dashboard was designed to evaluate all panels to determine policy
    so this type of thing could be avoided. This patch moves the content
    specific policy checks to the panels where they apply.

    Additionally, this fix uncovered another bug where policy_rules are
    wrapped in a list regardless of format. This patch adds a check and
    only wraps where necessary.

    Change-Id: I79314a45c3c552ebcb3bb7cc881c2467fa009c5d
    Closes-Bug: #1643013
    Closes-Bug: #1643074
    (cherry picked from commit 43e9df85ab286ddee96e9cff97f551781baf70d1)

tags: added: in-stable-newton
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/horizon 11.0.0.0b2

This issue was fixed in the openstack/horizon 11.0.0.0b2 development milestone.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/horizon 10.0.2

This issue was fixed in the openstack/horizon 10.0.2 release.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.