Skip to content

Commit

Permalink
fix permissions
Browse files Browse the repository at this point in the history
  • Loading branch information
lionick committed Sep 2, 2024
1 parent 0638628 commit be354c0
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
7 changes: 4 additions & 3 deletions javascript/src/components/Dashboard/loginIdpPieChart.js
Original file line number Diff line number Diff line change
Expand Up @@ -92,9 +92,10 @@ const LoginIdpPieChart = ({
callback: ({chartWrapper, google}) => {
const chart = chartWrapper.getChart();


google.visualization.events.addListener(chart, 'click', selectHandler);

if (cookies.userinfo != undefined
&& !!permissions?.actions?.identity_providers?.['view']) {
google.visualization.events.addListener(chart, 'click', selectHandler);
}

google.visualization.events.addListener(chart, 'onmouseover', showTooltip);
google.visualization.events.addListener(chart, 'onmouseout', hideTooltip);
Expand Down
5 changes: 3 additions & 2 deletions javascript/src/components/Dashboard/loginSpPieChart.js
Original file line number Diff line number Diff line change
Expand Up @@ -93,9 +93,10 @@ const LoginSpPieChart = ({
callback: ({chartWrapper, google}) => {
const chart = chartWrapper.getChart();


if (cookies.userinfo != undefined
&& !!permissions?.actions?.service_providers?.['view']) {
google.visualization.events.addListener(chart, 'click', selectHandler);

}
google.visualization.events.addListener(chart, 'onmouseover', showTooltip);
google.visualization.events.addListener(chart, 'onmouseout', hideTooltip);

Expand Down

0 comments on commit be354c0

Please sign in to comment.