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

feat(contact): display Altinn Servicedesk contact if user belongs to org #14371

Open
wants to merge 16 commits into
base: main
Choose a base branch
from

Conversation

framitdavid
Copy link
Collaborator

@framitdavid framitdavid commented Jan 7, 2025

Description

This PR introduces functionality to display Altinn Servicedesk contact information on the ContactPage. The contact details will only be visible to users associated with an organization.

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)

Testing the feature manually guide

Step 1: Test unauthenticated access

  1. Visit the Contact Page without logging in.
  2. Check for Visibility: Verify that the Altinn service desk information is not visible. This ensures that unauthenticated users do not have access to "sensitive" or not preferred information to show service desk information.

Step 2: Test access for authorized user

  1. Login with an Account that has access to an organization.
  2. Verify the Altinn Service Desk Information: Ensure that after logging in, the Altinn service desk information becomes visible. This confirms that authorized users can view the relevant service desk information.

Step 3: Test access for unauthorized users

  1. Login with a User who does not belong to the organization or does not have the necessary access rights.
  2. Check for the Hidden Altinn Service Desk Information: Confirm that the Altinn service desk information is hidden for users without proper permissions. This test ensures that unauthorized users cannot see the service desk information.

@github-actions github-actions bot added solution/studio/designer Issues related to the Altinn Studio Designer solution. quality/testing Tests that are missing, needs to be created or could be improved. backend area/studio-root Area: Issues related to studio-root application frontend labels Jan 7, 2025
Copy link

codecov bot commented Jan 7, 2025

Codecov Report

Attention: Patch coverage is 86.20690% with 4 lines in your changes missing coverage. Please review.

Project coverage is 95.56%. Comparing base (465fc97) to head (b3f66f6).

Files with missing lines Patch % Lines
...t/pages/hooks/queries/useFetchBelongsToOrgQuery.ts 57.14% 3 Missing ⚠️
frontend/packages/shared/src/mocks/queriesMock.ts 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main   #14371      +/-   ##
==========================================
- Coverage   95.57%   95.56%   -0.02%     
==========================================
  Files        1864     1868       +4     
  Lines       24151    24178      +27     
  Branches     2786     2787       +1     
==========================================
+ Hits        23082    23105      +23     
- Misses        812      816       +4     
  Partials      257      257              

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

@framitdavid framitdavid changed the title Contact page feat(contact): display Altinn Servicedesk contact if user belongs to org Jan 7, 2025
@framitdavid framitdavid marked this pull request as ready for review January 7, 2025 13:59
@framitdavid framitdavid linked an issue Jan 7, 2025 that may be closed by this pull request
2 tasks
Comment on lines 36 to 39
catch(Exception)
{
return Ok(new BelongsToOrgDto { BelongsToOrg = false });
}

Check notice

Code scanning / CodeQL

Generic catch clause Note

Generic catch clause.
Copy link
Member

@nkylstad nkylstad left a comment

Choose a reason for hiding this comment

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

Very clean and tidy PR!

frontend/packages/shared/src/types/QueryKey.ts Outdated Show resolved Hide resolved
frontend/studio-root/pages/Contact/ContactPage.test.tsx Outdated Show resolved Hide resolved
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/studio-root Area: Issues related to studio-root application backend frontend quality/testing Tests that are missing, needs to be created or could be improved. solution/studio/designer Issues related to the Altinn Studio Designer solution.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Implement contact page for logged in service owners
2 participants