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

Resourceadm: show alert if user does not have permission (is member of correct Gitea team) to publish resource or edit RRR access lists #12618

Merged
merged 10 commits into from
Apr 5, 2024

Conversation

mgunnerud
Copy link
Contributor

@mgunnerud mgunnerud commented Apr 4, 2024

Description

  • If user attempts to publish a resource and is not a member of the resources publish Gitea team for the given environment, for (example Resources-Publish-AT22) the request returns status 403 and a special error message is shown.
  • If user attempts to view or edit RRR access lists and is not a member of the accesslists Gitea team for the given environment, for (example AccessLists-AT22) the request returns status 403 and a special error message is shown.
  • Show environment name in resource publish success toast
  • Change description text of resource name field to be more descriptive
  • Small refactor with util function to get environment label

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)

@github-actions github-actions bot added the solution/studio/designer Issues related to the Altinn Studio Designer solution. label Apr 4, 2024
Copy link

@ghost ghost left a comment

Choose a reason for hiding this comment

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

LGTM 😄
One suggestion added.

Copy link

codecov bot commented Apr 4, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 88.72%. Comparing base (1f719df) to head (a0ec0c2).
Report is 5 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #12618      +/-   ##
==========================================
+ Coverage   88.70%   88.72%   +0.02%     
==========================================
  Files        1289     1292       +3     
  Lines       18523    18560      +37     
  Branches     2269     2275       +6     
==========================================
+ Hits        16430    16467      +37     
  Misses       1835     1835              
  Partials      258      258              

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

@mgunnerud mgunnerud merged commit 1577b41 into main Apr 5, 2024
10 checks passed
@mgunnerud mgunnerud deleted the 12611-frontend branch April 5, 2024 07:34
Jondyr pushed a commit that referenced this pull request Jun 10, 2024
…f correct Gitea team) to publish resource or edit RRR access lists (#12618)

* show error message if user does not have permission to read or edit resource accsslists

*  show error message if user does not have permission to publish resources

* show environment name in publish success toast

* change description text of resource name field

* refactor: add new error component for access list errors. Refactor environments to object, and remove org argument from getEnvLabel function
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: add Gitea teams for resource deploy and access list write permission
1 participant