Make sahara permission check backward compatible
In kilo, the service type of sahara changed from data_processing to data-processing. We should be checking for both data-processing and data_processing service for backward compatability. Change-Id: I6f55938b7c9dedcacc2fd6ba27c14ecc4e8565e3 Closes-Bug: #1433816
This commit is contained in:
parent
b79014ada1
commit
30d4b6d1f9
@ -21,7 +21,8 @@ from openstack_dashboard.dashboards.project import dashboard
|
||||
class ClusterTemplatesPanel(horizon.Panel):
|
||||
name = _("Cluster Templates")
|
||||
slug = 'data_processing.cluster_templates'
|
||||
permissions = ('openstack.services.data-processing',)
|
||||
permissions = (('openstack.services.data-processing',
|
||||
'openstack.services.data_processing'),)
|
||||
|
||||
|
||||
dashboard.Project.register(ClusterTemplatesPanel)
|
||||
|
@ -21,7 +21,8 @@ from openstack_dashboard.dashboards.project import dashboard
|
||||
class ClustersPanel(horizon.Panel):
|
||||
name = _("Clusters")
|
||||
slug = 'data_processing.clusters'
|
||||
permissions = ('openstack.services.data-processing',)
|
||||
permissions = (('openstack.services.data-processing',
|
||||
'openstack.services.data_processing'),)
|
||||
|
||||
|
||||
dashboard.Project.register(ClustersPanel)
|
||||
|
@ -21,7 +21,8 @@ from openstack_dashboard.dashboards.project import dashboard
|
||||
class ImageRegistryPanel(horizon.Panel):
|
||||
name = _("Image Registry")
|
||||
slug = 'data_processing.data_image_registry'
|
||||
permissions = ('openstack.services.data-processing',)
|
||||
permissions = (('openstack.services.data-processing',
|
||||
'openstack.services.data_processing'),)
|
||||
|
||||
|
||||
dashboard.Project.register(ImageRegistryPanel)
|
||||
|
@ -21,6 +21,8 @@ from openstack_dashboard.dashboards.project import dashboard
|
||||
class PluginsPanel(horizon.Panel):
|
||||
name = _("Plugins")
|
||||
slug = 'data_processing.data_plugins'
|
||||
permissions = ('openstack.services.data-processing',)
|
||||
permissions = (('openstack.services.data-processing',
|
||||
'openstack.services.data_processing'),)
|
||||
|
||||
|
||||
dashboard.Project.register(PluginsPanel)
|
||||
|
@ -21,7 +21,8 @@ from openstack_dashboard.dashboards.project import dashboard
|
||||
class DataSourcesPanel(horizon.Panel):
|
||||
name = _("Data Sources")
|
||||
slug = 'data_processing.data_sources'
|
||||
permissions = ('openstack.services.data-processing',)
|
||||
permissions = (('openstack.services.data-processing',
|
||||
'openstack.services.data_processing'),)
|
||||
|
||||
|
||||
dashboard.Project.register(DataSourcesPanel)
|
||||
|
@ -21,7 +21,8 @@ from openstack_dashboard.dashboards.project import dashboard
|
||||
class JobBinariesPanel(horizon.Panel):
|
||||
name = _("Job Binaries")
|
||||
slug = 'data_processing.job_binaries'
|
||||
permissions = ('openstack.services.data-processing',)
|
||||
permissions = (('openstack.services.data-processing',
|
||||
'openstack.services.data_processing'),)
|
||||
|
||||
|
||||
dashboard.Project.register(JobBinariesPanel)
|
||||
|
@ -21,7 +21,8 @@ from openstack_dashboard.dashboards.project import dashboard
|
||||
class JobExecutionsPanel(horizon.Panel):
|
||||
name = _("Job Executions")
|
||||
slug = 'data_processing.job_executions'
|
||||
permissions = ('openstack.services.data-processing',)
|
||||
permissions = (('openstack.services.data-processing',
|
||||
'openstack.services.data_processing'),)
|
||||
|
||||
|
||||
dashboard.Project.register(JobExecutionsPanel)
|
||||
|
@ -21,7 +21,8 @@ from openstack_dashboard.dashboards.project import dashboard
|
||||
class JobsPanel(horizon.Panel):
|
||||
name = _("Jobs")
|
||||
slug = 'data_processing.jobs'
|
||||
permissions = ('openstack.services.data-processing',)
|
||||
permissions = (('openstack.services.data-processing',
|
||||
'openstack.services.data_processing'),)
|
||||
|
||||
|
||||
dashboard.Project.register(JobsPanel)
|
||||
|
@ -21,7 +21,8 @@ from openstack_dashboard.dashboards.project import dashboard
|
||||
class NodegroupTemplatesPanel(horizon.Panel):
|
||||
name = _("Node Group Templates")
|
||||
slug = 'data_processing.nodegroup_templates'
|
||||
permissions = ('openstack.services.data-processing',)
|
||||
permissions = (('openstack.services.data-processing',
|
||||
'openstack.services.data_processing'),)
|
||||
|
||||
|
||||
dashboard.Project.register(NodegroupTemplatesPanel)
|
||||
|
@ -21,7 +21,8 @@ from openstack_dashboard.dashboards.project import dashboard
|
||||
class WizardPanel(horizon.Panel):
|
||||
name = _("Guides")
|
||||
slug = 'data_processing.wizard'
|
||||
permissions = ('openstack.services.data-processing',)
|
||||
permissions = (('openstack.services.data-processing',
|
||||
'openstack.services.data_processing'),)
|
||||
|
||||
|
||||
dashboard.Project.register(WizardPanel)
|
||||
|
Loading…
Reference in New Issue
Block a user