yahoo-eng-team team mailing list archive
-
yahoo-eng-team team
-
Mailing list archive
-
Message #29272
[Bug 1431049] [NEW] TableTab ignores Table permissions
Public bug reported:
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.
** Affects: horizon
Importance: Undecided
Assignee: Romain Hardouin (romain-hardouin)
Status: New
** Changed in: horizon
Assignee: (unassigned) => Romain Hardouin (romain-hardouin)
** Description changed:
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:
+ When defining a TableTab we specify one or more DataTable via
+ table_classes attribute:
class MyTab(tabs.TableTab):
- table_classes = [SimpleTable, ProtectedTable]
-
+ 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']
+ ...
+ 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.
-
+ 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']
+ ...
+ class Meta(object):
+ ...
+ permissions = ['invalid']
- Then go to: Compute > Volumes > Volume Snapshots.
+ Then go to: Compute > Volumes > Volume Snapshots.
You will see the corresponding table.
--
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to OpenStack Dashboard (Horizon).
https://bugs.launchpad.net/bugs/1431049
Title:
TableTab ignores Table permissions
Status in OpenStack Dashboard (Horizon):
New
Bug 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
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.
To manage notifications about this bug go to:
https://bugs.launchpad.net/horizon/+bug/1431049/+subscriptions
Follow ups
References