Bug 773237 - Not possible to see children resources for a custom role
Not possible to see children resources for a custom role
Status: CLOSED DUPLICATE of bug 773235
Product: RHQ Project
Classification: Other
Component: Core UI (Show other bugs)
4.2
Unspecified Linux
unspecified Severity medium (vote)
: ---
: ---
Assigned To: RHQ Project Maintainer
Mike Foley
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2012-01-11 05:21 EST by vlad crc
Modified: 2012-01-27 05:08 EST (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2012-01-16 15:41:49 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description vlad crc 2012-01-11 05:21:36 EST
Description of problem:
It is not possible to see the children of a resource if you are logged in with a user having a custom role, with resource permissions only.


Version-Release number of selected component:
4.2


How reproducible:
Always


Steps to Reproduce:
1. login as "rhqadmin".
2. assume you have one platform imported, containing a JBoss 4.2.3 server and the RHQ agent.
3. create a group called "mygroup" containing this platform.
4. create a role named "operator".
5. give it no global permissions.
6. give it resource permissions:
    - all IMPLIED
    - inventory Read&Write
    - manage measurements Read&Write
    - manage alerts: Read&Write
    - control: Read&Write
    - manage events: Read&Write
7. create a new user "tom"
8. assign "tom" the "operator" role
9. assign "mygroup" to "operator" role
10. logout
11. login as "tom"
12. go to "Inventory / Platforms"
13. select the platform
14. in the resources tree on the left side, try to expand the JBoss resource or the RHQ-Agent resource.

  
Actual results:
Children are not displayed. On the top banner I get the error message "Failed to load children for node".
In "message center" the details are these:

---------------------------------------------------------------------
java.lang.RuntimeException:[1326275804239] org.rhq.enterprise.server.authz.PermissionException:Subject [tom] requires InventoryManager permission for requested query criteria.
---------------------------------------------------------------------


Expected results:
I should be able to normally browse the children of JBoss or RHQ-Agent.

In RHQ server log there is this exception:
---------------------------------------------------------------------
2012-01-11 11:01:45,931 WARN  [gwt-log] Sending exception to client: [1326276105930]
org.rhq.enterprise.server.authz.PermissionException: Subject [tom] requires InventoryManager permission for requested query criteria.
        at org.rhq.enterprise.server.resource.ResourceManagerBean.findResourcesByCriteria(ResourceManagerBean.java:2452)
---------------------------------------------------------------------


Additional info:
If I go to "Inventory / All groups" and select "mygroup", then it's "Inventory" tab, in the list of members click on the JBoss then in the resources tree, I can see all the JBoss children normally.
Comment 1 Mike Foley 2012-01-16 15:41:49 EST

*** This bug has been marked as a duplicate of bug 773225 ***
Comment 2 Lukas Krejci 2012-01-27 05:08:21 EST

*** This bug has been marked as a duplicate of bug 773235 ***

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