Skip to content

Commit

Permalink
Add enabled check in Backups panel
Browse files Browse the repository at this point in the history
If enable_backup is False in OPENSTACK_CINDER_FEATURES
then we should not display the backups panel.

Change-Id: I276eebf0f11406bf354f5d8bbecef7b244d6d340
Closes-Bug: #1778771
  • Loading branch information
dosaboy committed Sep 27, 2018
1 parent e59411d commit 6c2225b
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions openstack_dashboard/dashboards/project/backups/panel.py
Expand Up @@ -14,6 +14,8 @@

from django.utils.translation import ugettext_lazy as _

from openstack_dashboard import api

import horizon


Expand All @@ -25,3 +27,7 @@ class Backups(horizon.Panel):
'openstack.services.volumev3'),
)
policy_rules = (("volume", "backup:get_all"),)

@staticmethod
def can_register():
return api.cinder.volume_backup_supported(None)

0 comments on commit 6c2225b

Please sign in to comment.