Skip to content
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

Fixed Endpoint View permissions #3660

Merged
merged 3 commits into from
Nov 22, 2022

Conversation

Coduz
Copy link
Contributor

@Coduz Coduz commented Nov 18, 2022

This PR fixes the permission and checks required to show the Endpoint View on console which should be available only to admin account, and only if the selected account is the root account or one of the first level accounts.

Related Issue
This PR fixes changes made in #3560 which was wrong due to misleading GwtSession.getRootAccountId() method.

Description of the solution adopted

  • Cleaned up GwtSession class
  • Deprecated GwtSession.getRootAccountId() and GwtSession.getRootAccountName()
  • Fixed the behaviour adding few methods to check the level of the selected Account

Screenshots
None

Any side note on the changes made
None

Signed-off-by: Alberto Codutti <alberto.codutti@eurotech.com>
…ame because they were misleading on their actual usage

Signed-off-by: Alberto Codutti <alberto.codutti@eurotech.com>
Signed-off-by: Alberto Codutti <alberto.codutti@eurotech.com>
@Coduz Coduz added Bug This is a bug or an unexpected behaviour. Fix it! Console GWT This issue/PR is related to Admin Web Console labels Nov 18, 2022
@Coduz Coduz requested a review from stefanomorson November 18, 2022 16:08
@codecov
Copy link

codecov bot commented Nov 18, 2022

Codecov Report

Merging #3660 (11e9883) into develop (d3fa400) will decrease coverage by 4.43%.
The diff coverage is n/a.

❗ Current head 11e9883 differs from pull request most recent head 53a0f36. Consider uploading reports for the commit 53a0f36 to get more accurate results

Impacted file tree graph

@@              Coverage Diff              @@
##             develop    #3660      +/-   ##
=============================================
- Coverage      48.03%   43.60%   -4.44%     
+ Complexity       259      184      -75     
=============================================
  Files           1686     1686              
  Lines          32165    32165              
  Branches        2642     2642              
=============================================
- Hits           15452    14027    -1425     
- Misses         15806    17332    +1526     
+ Partials         907      806     -101     
Impacted Files Coverage Δ
...pse/kapua/kura/simulator/GatewayConfiguration.java 0.00% <0.00%> (-100.00%) ⬇️
...a/kura/simulator/birth/BirthCertificateModule.java 0.00% <0.00%> (-100.00%) ⬇️
...ration/exception/KapuaConfigurationErrorCodes.java 0.00% <0.00%> (-100.00%) ⬇️
...del/query/predicate/ChannelMatchPredicateImpl.java 0.00% <0.00%> (-100.00%) ⬇️
...ent/packages/message/internal/PackageResource.java 0.00% <0.00%> (-100.00%) ⬇️
...kages/model/internal/DevicePackageOptionsImpl.java 0.00% <0.00%> (-100.00%) ⬇️
...l/setting/PackageManagementServiceSettingKeys.java 0.00% <0.00%> (-100.00%) ⬇️
...oad/internal/DevicePackageDownloadOptionsImpl.java 0.00% <0.00%> (-100.00%) ⬇️
...lator/app/deploy/DeploymentPackageInformation.java 0.00% <0.00%> (-93.75%) ⬇️
...internal/DeviceManagementOperationCreatorImpl.java 0.00% <0.00%> (-92.86%) ⬇️
... and 110 more

@Coduz Coduz merged commit f99853d into eclipse:develop Nov 22, 2022
@Coduz Coduz deleted the fix-endpointInfoViewPermissions branch December 12, 2022 10:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug This is a bug or an unexpected behaviour. Fix it! Console GWT This issue/PR is related to Admin Web Console
Projects
Development

Successfully merging this pull request may close these issues.

1 participant