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

resourceam: do not allow resource identifier to start with 'app_' #12500

Conversation

mgunnerud
Copy link
Contributor

@mgunnerud mgunnerud commented Mar 13, 2024

Description

  • The "app_" prefix is reserved for apps. Show an error message if user attempts to create a resource with the "app_" prefix. This is validated in frontend and in BFF
  • Only allow a-å, 0-9, - and _ as valid characters in resource identifier. In frontend, any illegal characters are replaced by "-". In backend, creating or importing a resource with illegal characters in identifier will return error 400.

Related Issue(s)

Verification

  • Your code builds clean without any errors or warnings
  • Manual testing done (required)
  • Relevant automated test added (if you find this hard, leave it and we'll help out)

Documentation

  • User documentation is updated with a separate linked PR in altinn-studio-docs. (if applicable)

@mgunnerud mgunnerud linked an issue Mar 13, 2024 that may be closed by this pull request
@github-actions github-actions bot added the solution/studio/designer Issues related to the Altinn Studio Designer solution. label Mar 13, 2024
Copy link

codecov bot commented Mar 13, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 88.18%. Comparing base (6906404) to head (c54c9c9).
Report is 3 commits behind head on main.

❗ Current head c54c9c9 differs from pull request most recent head 35e30f9. Consider uploading reports for the commit 35e30f9 to get more accurate results

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #12500      +/-   ##
==========================================
+ Coverage   88.16%   88.18%   +0.01%     
==========================================
  Files        1287     1287              
  Lines       18367    18384      +17     
  Branches     2256     2257       +1     
==========================================
+ Hits        16194    16212      +18     
+ Misses       1905     1904       -1     
  Partials      268      268              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@mgunnerud mgunnerud requested a review from framitdavid March 14, 2024 06:30
@mgunnerud mgunnerud marked this pull request as draft March 14, 2024 08:23
@mgunnerud
Copy link
Contributor Author

Converted to draft: need to add validation to backend as well

@mgunnerud mgunnerud marked this pull request as ready for review March 14, 2024 10:20
@mgunnerud mgunnerud merged commit 3da6d66 into main Mar 15, 2024
10 checks passed
@mgunnerud mgunnerud deleted the 12490-resourceadm-possible-to-create-an-resource-with-app_-prefix branch March 15, 2024 09:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
solution/studio/designer Issues related to the Altinn Studio Designer solution.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Resourceadm: Possible to create an Resource with app_ prefix
2 participants