Alert Maintenance & Permissions

Mark Addy maddy at c2b2.co.uk
Sat Mar 16 07:49:15 UTC 2013


Hi,

I've been looking into an issue reported by our users around the 
acknowledgement and deletion of alerts.

 From the main dashboard, or any view not associated to a group or 
resource the only users capable of acknowledging or deleting alerts are 
those with global permissions.  The effect is that users with specific 
role permissions to manage alerts against a group of resource must drill 
into the heirarchy before they can ack or delete those alerts.  We'd 
like to be able to let them perform this action from any of the recent 
alert windows.

After looking into the code I the fix seems straight forward.

A change the "Delete" and "Acknowledge" alert buttons in the 
AlertHistoryView to use a "ResourceAuthorizedTableAction" rather than 
"AbstractTableAction".  This will generate an additional call to the 
backend to check permissions when an alert row is selected and activate 
the button if permission exists.  This could be optimized by 
pre-generating the users permissions as part of the Alert Table as 
suggested in the comments in "ResourceAuthorizedTableAction" - I could 
then override the "isEnabled" method to use these rather than calling 
the back end. This would require creation of some kind of 
"AlertWithPermissions" Composite to wrap the "Alert" and include the 
users permissions or a manageable flag?

I'd like to make the changes and contribute them back - we are currently 
running 4.4.0 but the change also applies to the current master branch.

Would you be happy with the changes suggested above or perhaps there is 
a better way to implement this?
If its Ok what is the best way for me to submit changes and against 
which branch should I make them?

Thanks

Mark


More information about the rhq-devel mailing list