[WIP] added MiqReportResult#available_to_user? (to fix access issue with widgets) #15920
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Follow-up to ManageIQ/manageiq-ui-classic#1627, ManageIQ/manageiq-ui-classic#1827
blocker for: ManageIQ/manageiq-ui-classic#2069 Fix widget maximize, zoom-in and pdf operation by checking other condition in addition to linked MiqGroup
BZ: https://bugzilla.redhat.com/show_bug.cgi?id=1492174
Issue:
MiqReportResult.for_user(user)
will skip report results generated for widgets.Report result records generated for widgets do not have linked user group and
miq_report_results.miq_group_id
not set.Also, accessibility of widget can be based on role. Role name (or group name if accessibility of widget based on role) added (with
|
separator) in themiq_report_results.userid
column.Solution: check if user can access report based on other condition (in addition to linked group)
Probably, the better way to fix above issues is to make sure that
miq_report_results.miq_group_id
is set for any report and link `MiqUserRole' to report result, but it looks like bigger task and may take more time.@miq-bot add-label bug, core
\cc @gtanzillo