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

fix: getAsset should search in commons assets too #380

Merged
merged 5 commits into from
Nov 18, 2024

Conversation

thomas-mauran
Copy link
Member

What does this PR do ?

The bug appears when someone tries to create an asset with a model which uses an engineGroup sets to commons, resulting in an error in the frontend saying "insufficient permissions".

The problem comes from the assetCreate in KDM which calls the models:asset:get to get the model of the asset we want to create, the thing is that we don't check if in the engineId: commons, so when this is the case it result in an error being thrown saying the asset we are looking for doesn't exist

How should this be manually tested?

  • Step 1 : cloen and run the iot platform
  • Step 2 : run the fixtures
  • Step 3 : modify the model container to change engineId to "commons"
  • Step 4: try to create an asset of type Container

@thomas-mauran thomas-mauran force-pushed the KZLPRD-657-fix-create-asset-group-commons branch from 012a055 to 8340e8d Compare November 12, 2024 13:33
Copy link
Contributor

@Juiced66 Juiced66 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

well done gj

@thomas-mauran thomas-mauran changed the title Kzlprd 657 fix create asset group commons fix: getAsset should search in commons assets too Nov 12, 2024
@thomas-mauran thomas-mauran changed the base branch from 3-dev to master November 18, 2024 09:01
@thomas-mauran thomas-mauran force-pushed the KZLPRD-657-fix-create-asset-group-commons branch from bd4e554 to c6eb1e8 Compare November 18, 2024 09:08
@thomas-mauran thomas-mauran force-pushed the KZLPRD-657-fix-create-asset-group-commons branch from 6b95020 to 7724630 Compare November 18, 2024 09:12
@sebtiz13 sebtiz13 merged commit d588a93 into master Nov 18, 2024
7 checks passed
@sebtiz13 sebtiz13 deleted the KZLPRD-657-fix-create-asset-group-commons branch November 18, 2024 10:09
github-actions bot pushed a commit that referenced this pull request Nov 18, 2024
## [2.4.4](v2.4.3...v2.4.4) (2024-11-18)

### Bug Fixes

* getAsset should search in commons assets too ([#380](#380)) ([d588a93](d588a93))
sebtiz13 added a commit that referenced this pull request Nov 18, 2024
github-actions bot pushed a commit that referenced this pull request Nov 18, 2024
# [2.5.0-dev.2](v2.5.0-dev.1...v2.5.0-dev.2) (2024-11-18)

### Bug Fixes

* backport fix ([#380](#380)) ([5392b56](5392b56))
* getAsset should search in commons assets too ([#380](#380)) ([d588a93](d588a93))
sebtiz13 added a commit that referenced this pull request Nov 18, 2024
github-actions bot pushed a commit that referenced this pull request Nov 18, 2024
# [2.5.0-beta.2](v2.5.0-beta.1...v2.5.0-beta.2) (2024-11-18)

### Bug Fixes

* backport fix ([#380](#380)) ([5392b56](5392b56))
* getAsset should search in commons assets too ([#380](#380)) ([d588a93](d588a93))
github-actions bot pushed a commit that referenced this pull request Nov 18, 2024
# [3.0.0-next.2](v3.0.0-next.1...v3.0.0-next.2) (2024-11-18)

### Bug Fixes

* backport fix ([#380](#380)) ([5392b56](5392b56))
* getAsset should search in commons assets too ([#380](#380)) ([d588a93](d588a93))
github-actions bot pushed a commit that referenced this pull request Dec 5, 2024
# [2.5.0](v2.4.4...v2.5.0) (2024-12-05)

### Bug Fixes

* **assetservice:** can't replace metadata if not present in asset ([#384](#384)) ([eb65c0a](eb65c0a))
* backport fix ([#380](#380)) ([5392b56](5392b56))

### Features

* add editor hint support ([#386](#386)) ([a9b62df](a9b62df))
* **measure:** allow measures to be pushed on Assets via API (no devices) ([#344](#344)) ([c1073c1](c1073c1))
* **softTenants:** add softTenant ids to assets measures documents ([#383](#383)) ([1b36fe0](1b36fe0))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants