Hide Forgot
Description of problem: All actions/buttons for recent alerts portlet always disabled. Unable to Ack alerts. This used to work in earlier builds/releases. Version-Release number of selected component (if applicable): How reproducible: Every time. Steps to Reproduce: 1. Login as rhqadmin and view recent alerts in portlet view. Actual results: Unable to delete, acknowledge alerts directly from the portlet. Expected results: Buttons enabled/disabled as expected. Additional info: Navigating to the full alerts view for the resource, the buttons are correctly enabled to delete/ack alerts.
This is not as simple as it seems because the portlet view is a "subsystem" view of alerts. meaning it displays alerts for viewable resources [potentially] across groups with different permissions. So, a user may not have Alert permission on all of the displayed alerts. So, to enable the buttons correctly, in a fine-grained way, you need to permission check against all of the selected alerts. This is a general auth/button enablement issue with "subsystem views", when a user may have varying permissions on list entries.
After some discussion the decision is that the main purpose of portlets is to provide a quick overview of inventory status and, if not fast or easy, may not support everything the detailed views may support. In this case the buttons will be hidden for non-inventory manager users. Other users can navigate quickly from the portlet to the detailed views via links provided in the alerts listed in the portlet.
commit edcb7e6230d6bd47593d2e6183e27c9afb30f2db In short this is due to the fact that the recent alerts portlet is like the recent alerts report, they are both "subsystem" views. As such the single alert listing can include alerts for which the user may or may not have alert (write) perms. Both the portlet and the report view simply disallowed the buttons to be safe. There are only really three alternatives, disallow all buttons, allow the buttons only for inv managers, or code up granular button enablement that involves perm checking on the resources backing each alert. I took option 2 which at least allows inv managers the ability to process the alerts en masse from the portlet or the report. Other users will need to navigate to the alert or resource from the links provided, and process alerts from there. This change makes available the user's global perms to any portlet, and also any AbstractSectionedLeftNavigationView (the latter for the reports view).
verified RHQ 4.0 release candidate #1. the recent alerts portlet's buttons have been removed and shows quick overview. makes sense.
Bookkeeping - closing bug - fixed in recent release.