Bug 991468

Summary: delete all button
Product: [Other] RHQ Project Reporter: vlad crc <vlad.craciunoiu>
Component: Core UI, AlertsAssignee: Nobody <nobody>
Status: NEW --- QA Contact:
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 4.7CC: hrupp
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
delete all button problem none

Description vlad crc 2013-08-02 13:24:33 UTC
Created attachment 781965 [details]
delete all button problem

Description of problem:
When a user tries to "delete all" alerts on a resource, it fails with exception.

Version-Release number of selected component (if applicable):
4.7

How reproducible:
always

Steps to Reproduce:
1. create a user with 
- global permissions: manage inventory
- resource permissions: all, read&write

2. login as with user

3. in tree browser select a particular resource

4. go to Alerts / History tab

5. have some alerts there

6. click on "Delete All" button

Actual results:
Operation fails, the message bar on the top of the page displays red message:

-----------------------------------
[1375449667092] org.rhq.enterprise.server.authz.PermissionException:Subject [vcraciunoiu] is not authorized for [MANAGE_SETTINGS]: invocation: method=public int org.rhq.enterprise.server.alert.AlertManagerBean.deleteAlertsByContext(org.rhq.core.domain.auth.Subject,org.rhq.core.domain.common.EntityContext),context-data={}
-----------------------------------


Expected results:
Operation should succeed, all alerts of that resource should be deleted.

Additional info:
It shouldn't be any difference between "Delete" and "Delete All" buttons in terms of permissions.