Created attachment 1591742 [details]
Engine log for request
Description of problem:
When trying to send /events request with `search` query as regular user, it don't filter events. But if send same request as admin everything working fine.
Version-Release number of selected component (if applicable):
Steps to Reproduce:
Send request: https://[engine]/ovirt-engine/api/events?search=severity%3Derror as regular user.
Events in response not filtered.
In response only events with `severity=error`
It seems like problem with header `Filter: true`, because if set that header for admin, result not filtered as well.
Regular user not able to query any request at all - neither unfiltered nor filtered.
I've re-verified and it is working for me.
Perhaps we are not verifying in the same way; let me describe what I have done:
1) create a non-admin user (ori)
2) create a new Cluster (cluster_1)
3) grant ori UserRole on cluster_1
At this point GET .../api/events run as ori should return exactly one event: the addition of cluster_1
now we test the search:
http://.../ovirt-engine/api/events?search=severity%3Dnormal - should return a list with one item - this event
http://.../ovirt-engine/api/events?search=severity%3Dwarning - should return an empay list
This proves that performing a search as a regular (non-admin) user works.
Does this seem like reasonable verification? Is it similar to the verification that you've done?
Hi. I could verify now! The thing was, I was assigning system-wide UserRole for my user instead of assigning it for a specific Cluster or Data Center.
I'm not sure if that should be filled as bug or not.
Either way, verified on:
1. Created new user u0
2. Assigned UserRole to u0 on the Cluster (and later on the Data Center) to be used
3a. Made GET request on .../api/events
3b. Made GET request on .../api/events?search=severity%3Derror
3c. Made GET request on .../api/events?search=severity%3Dnormal
a. Got all events
b. Got only error status events
c. Got only normal status events
This bugzilla is included in oVirt 4.3.7 release, published on November 21st 2019.
Since the problem described in this bug report should be
resolved in oVirt 4.3.7 release, it has been closed with a resolution of CURRENT RELEASE.
If the solution does not work for you, please open a new bug report.