2015-03-11 22:17:14 |
Romain Hardouin |
description |
TableTab ignores permissions set on table(s) listed in table_classes attribute.
When defining a TableTab we specify one or more DataTable via table_classes attribute:
class MyTab(tabs.TableTab):
table_classes = [SimpleTable, ProtectedTable]
If ProtectedTable has permissions set in inner Meta classe like so:
class ProtectedTable(tables.DataTable):
...
class Meta(object):
permissions = ['openstack.roles.admin']
Permission should be honored and, in this example, only an admin must be able to
view the table ProtectedTable.
How to reproduce
==============
An easy way to reproduce it is to change permission on an existing table used in a tab.
For instance, change permission of VolumeSnapshotsTable to something invalid:
class VolumeSnapshotsTable(volume_tables.VolumesTableBase):
...
class Meta(object):
...
permissions = ['invalid']
Then go to: Compute > Volumes > Volume Snapshots.
You will see the corresponding table. |
TableTab ignores permissions set on table(s) listed in table_classes attribute.
When defining a TableTab we specify one or more DataTable via table_classes attribute:
class MyTab(tabs.TableTab):
table_classes = [SimpleTable, ProtectedTable]
If ProtectedTable has permissions set in inner Meta classe like so:
class ProtectedTable(tables.DataTable):
...
class Meta(object):
permissions = ['openstack.roles.admin']
Permission should be honored and, in this example, only an admin must
able to view the table ProtectedTable.
How to reproduce
==============
An easy way to reproduce it is to change permission on an existing table used in a tab.
For instance, change permission of VolumeSnapshotsTable to something invalid:
class VolumeSnapshotsTable(volume_tables.VolumesTableBase):
...
class Meta(object):
...
permissions = ['invalid']
Then go to: Compute > Volumes > Volume Snapshots.
You will see the corresponding table. |
|