-
Notifications
You must be signed in to change notification settings - Fork 68
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
User Dashboard - Center Report Card: Support #943
Conversation
These files belong in the `appkernels` module and have been moved there.
Just cleaning things up to appease the linter.
This should not have been committed.
This change is included in the appkernels module branch `novice_appkernels`.
The inclusion of these files should be via AppKernels assets.d file.
}, | ||
|
||
listeners: { | ||
// eslint-disable-next-line no-shadow |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
part of me wants to just fix this instead of disabling the linter...
token = tabPanel.id + CCR.xdmod.ui.tokenDelimiter + tab.id; | ||
Ext.History.add(token); | ||
// eslint-disable-next-line no-mixed-operators | ||
} else if (hasActiveTab && hasTab && tab.id !== CCR.xdmod.ui.activeTab.id || |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
part of me wants to just fix this instead of disabling the linter...
|
||
if (token) { | ||
var root = CCR.exists(parts.root) ? parts.root : 'main_tab_panel'; | ||
// eslint-disable-next-line no-shadow |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
part of me wants to just fix this instead of disabling the linter...
CCR.xdmod.ui.Viewer.viewerInstance = this; | ||
}, // initComponent | ||
getParameterByName: function (name, source) { | ||
// eslint-disable-next-line no-param-reassign,no-useless-escape |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
part of me wants to just fix this instead of disabling the linter...
Updates per @jpwhite4 code review comments Co-Authored-By: Joe White <[email protected]>
classes/XDUser.php
Outdated
@@ -2606,4 +2606,48 @@ public function isSticky() | |||
{ | |||
return $this->sticky; | |||
} | |||
|
|||
/** | |||
* Retrieves the resources that this user has access to. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think this function belongs in the XDUser class. It also circumvents the ACL tables - which surely is the authoritative source of user access information. Why not build on the existing getDimensionValues functionality in the Warehouse Controller? This already has the access control code and use the GroupBy classes to acces the data in the datawarehouse.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
*nod* It does circumvent the ACL tables. I'll look at the getDimensionValues
function for a re-write. As an explanation, the results of this function are used in constructing a \AppKernel\PerformanceMap` object which utilizes the ACL tables to restrict the final output by the resources the requesting user has access to. But those changes are in the AppKernels module PR and I didn't reference it specifically. Thanks again for the catch, I'll have an update incoming shortly.
Ok, so quick update after actually reading my code ( I blame lack of caffeine ) ... This function doesn't circumvent the ACL tables in so much as it doesn't actually need them ( per se ). It uses this Users's organization_id
to retrieve the resource_fact.id
's associated with their organization. It's implied that if they are associated with an organization then they are also associated with their organization's resources.
So, since the function uses / requires User's Organization, I added it directly to XDUser instead of adding it as a helper function that accepts a $userOrganization
parameter someplace else.
This is so that we can control when `$user->getAllRoles()` includes the public acl. The default value for all arguments has been set to `true` as that was the behavior pre-change. This will be used in the `AppKernels` module to help filter appropriately for the Center Report Card Portlet.
We're no longer using this function so it is being removed.
Was missing a parameter from the `checkDataAccess` function call.
After much research and discussion w/ @jpwhite4, this function is being re-added w/ some additional documentation && an authorization check to ensure that it is only called for Center [Director|Staff] users. In addition, the REST endpoint that uses this function ( in the `appkernel` module )is also being updated to require users who request it to be Center [Director|Staff] as well.
Just needed to update the sql so that it returns data in the same format as `MetricExplorer::getDimensionValues` as that is what `AppKernels/PerformanceMap` is currently setup to process.
Description
The changes made in this PR are in support of the
novice_appkernels
branch of theappkernels
module. Specifically:classes/Rest/Controllers/SummaryControllerProvider.php
:$queryConfig->featured
property not being present. Which caused exceptions to be thrown. So I just added a quick guard to make sure that the property was present prior to inspecting its value.classes/XDUser.php
:getResources
function is utilized in the mainnovice_appkernels
PR in theappkernels
module, but as it made sense to include it inXDUser.php
the change was made here.html/gui/js/Viewer.js
:html/index.php
:appkernels
module which were moved from the internal dashboard to the main interface.Motivation and Context
To get OpenXDMoD ready to support the
CenterReportCardPortlet
as well as host theAppKernelPerformanceMap
from the internal dashboard.Tests performed
Manual Testing was performed in conjunction w/ the App Kernels
novice_appkernels
branch installed. These changes are live on my dev port [9006].Types of changes
Checklist: