Bugzilla (bugzilla.redhat.com) will be under maintenance for infrastructure upgrades and will not be available on July 31st between 12:30 AM - 05:30 AM UTC. We appreciate your understanding and patience. You can follow status.redhat.com for details.
Bug 1201110 - [RFE][horizon]: DataTable column level permissions
Summary: [RFE][horizon]: DataTable column level permissions
Keywords:
Status: CLOSED UPSTREAM
Alias: None
Product: Red Hat OpenStack
Classification: Red Hat
Component: RFEs
Version: unspecified
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
: ---
Assignee: RHOS Maint
QA Contact:
URL: https://blueprints.launchpad.net/hori...
Whiteboard: upstream_milestone_none upstream_defi...
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-03-12 04:07 UTC by RHOS Integration
Modified: 2015-07-22 18:05 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Enhancement
Doc Text:
Clone Of:
Environment:
Last Closed:
Target Upstream Version:


Attachments (Terms of Use)

Description RHOS Integration 2015-03-12 04:07:32 UTC
Cloned from launchpad blueprint https://blueprints.launchpad.net/horizon/+spec/datatable-column-level-permissions.

Description:

Summary
=======
Add Column-level permissions to DataTable.


Motivation
==========

The need arised when implementing blueprint trove-list-datastores-and-versions.
The table which displays datastores versions must include columns for admins.
Regular users must see only "name" and "ID" whereas an admin will sees 
"name", "ID", "active", "packages" and "image ID".


Description
===========

Be able to filter DataTable's columns depending user permissions.
Thus we can easily display admin only columns.

This is *not only* about hiding columns.

For instance, some data are not available to regular users in API responses.
So when a user does not have the permissions we must ignore the columns as if
they were not defined.

basic example
-------------

class MyTable(tables.DataTable):

    column = tables.Column(...)
    admin_only_column = tables.Column(...,
                                      permissions=['openstack.roles.admin'])    

Only a admin would see the second column.
Regular users would see only the first.


concrete example
----------------

See the following files in https://review.openstack.org/#/c/163196/:

 * DataTable patch: horizon/tables/base.py
 * Usage: database_datastores/tables.py

UX
==

None

Testing
=======

When a DataTable is rendered to a user who has not the permissions to view a 
column, we must ensure that:

 * The column is not showed
 * The column data is not processed
 

Outside Dependencies
====================

None

Requirements Update Required
============================

None

Doc Impact
==========

Document how to filter DataTable columns thanks to the new argument:
``permissions``.


Specification URL (additional information):

None


Note You need to log in before you can comment on or make changes to this bug.