Multiple-select checkboxes activate "dangerous" buttons regardless of permissions

Bug #1092647 reported by Nicolas Simonds
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Dashboard (Horizon)
Confirmed
Wishlist
Unassigned

Bug Description

Users have been reporting confusion surrounding bulk-action buttons like "Delete Images", etc. that un-grey themselves when selecting rows in the table via checkboxes, despite the fact that the users do not have rights to perform the actions.

This is ultimately harmless, as the GUI kicks back a "permission denied" error, but it is always better to refrain from showing controls to users that they cannot use.

A simple test case, that works even for Admin users:

1. Login to Horizon
2. Go to "Project" -> "Access & Security"
3. Click on the checkbox for the "default" security group, watch the bulk "Delete Security Groups" button un-grey itself
4. Click on the button, and watch Horizon throw an error

Expected behavior:

Aggregate action buttons for "dangerous" (as per the name of the CSS class that gets applied) actions should not un-grey unless the user has rights to perform them on at least one of the selected items.

Actual behavior:

The button just un-greys itself, and leaves it to the back-end to sort out the problems.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to horizon (master)

Fix proposed to branch: master
Review: https://review.openstack.org/18500

Changed in horizon:
assignee: nobody → Nicolas Simonds (nicolas.simonds)
status: New → In Progress
Revision history for this message
Gabriel Hurley (gabriel-hurley) wrote :

The larger issue can't particularly be solved until we have full policy engine support via the keystone API (e.g. a rollup of all the project policy files) so that we can determine things accurately.

Changed in horizon:
importance: Undecided → Wishlist
Revision history for this message
Sudheer Kalla (sudheer-kalla) wrote :

For the restricted rows in horizon like protected images, default networks and default security groups disabling the selection of check box it self will solve the issue

Masco (masco)
Changed in horizon:
assignee: Nicolas Simonds (nicolas.simonds) → nobody
Revision history for this message
Masco (masco) wrote :

removed assignee since not active for long time

Ivan Kolodyazhny (e0ne)
Changed in horizon:
status: In Progress → Confirmed
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers