Panel visibility check for Aggregates is overriding the wrong method

Bug #1403701 reported by Lin Hua Cheng
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Dashboard (Horizon)
Fix Released
Undecided
Lin Hua Cheng

Bug Description

There are two patterns used in defined if panels are visible:
1. overriding allowed()

https://github.com/openstack/horizon/blob/master/openstack_dashboard/dashboards/project/firewalls/panel.py#L26

2. overriding can_access()

https://github.com/openstack/horizon/blob/master/openstack_dashboard/dashboards/admin/aggregates/panel.py#L26

One of this is wrong and must be consistent with the other.

According to the doc, can_access() is not supposed to overridden: https://github.com/openstack/horizon/blob/master/horizon/base.py#L114

Changed in horizon:
assignee: nobody → Lin Hua Cheng (lin-hua-cheng)
summary: - Fix consistency on panel visibility check
+ Panel visibility check should be overried using allowed() instead of
+ can_access()
summary: - Panel visibility check should be overried using allowed() instead of
- can_access()
+ Panel visibility check for Aggregates is overriding the wrong method
description: updated
description: updated
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/142687

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/142687
Committed: https://git.openstack.org/cgit/openstack/horizon/commit/?id=9fae45cde101188c6541a951df78fb4e17c13822
Submitter: Jenkins
Branch: master

commit 9fae45cde101188c6541a951df78fb4e17c13822
Author: lin-hua-cheng <email address hidden>
Date: Wed Dec 17 22:33:42 2014 -0800

    Fix Firewalls panel to override the right method

    Instead of overriding can_acess(), the panel check should
    be overriding allowed() method instead. Overriding can_access()
    will disable caching for the method.

    Change-Id: Ibee85cdcf505e90d9faeb54dbab7216fc24c1b2c
    Closes-Bug: #1403701

Changed in horizon:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in horizon:
milestone: none → kilo-2
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in horizon:
milestone: kilo-2 → 2015.1.0
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.