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

DESENG-447 : Convert keycloak groups to composite roles for permission levels #2376

Merged
merged 7 commits into from
Feb 7, 2024

Conversation

ratheesh-aot
Copy link
Collaborator

Issue #: https://apps.itsm.gov.bc.ca/jira/browse/DESENG-447

Description of changes:

  1. Commented out unit test related to Keycloak groups
  2. Remove reference of Keycloak groups to roles
  3. Commented out code related to Keycloak groups

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of the met-public license (Apache 2.0).

@ratheesh-aot ratheesh-aot requested a review from Baelx February 7, 2024 01:00
@codecov-commenter
Copy link

Codecov Report

Attention: 6 lines in your changes are missing coverage. Please review.

Comparison is base (16d4f32) 72.21% compared to head (e9efd87) 71.81%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2376      +/-   ##
==========================================
- Coverage   72.21%   71.81%   -0.41%     
==========================================
  Files         509      509              
  Lines       17130    16915     -215     
  Branches     1288     1288              
==========================================
- Hits        12370    12147     -223     
- Misses       4520     4528       +8     
  Partials      240      240              
Flag Coverage Δ
metapi 86.43% <71.42%> (-0.46%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files Coverage Δ
met-api/src/met_api/models/membership.py 70.93% <ø> (-16.28%) ⬇️
...et-api/src/met_api/resources/engagement_members.py 76.78% <ø> (-15.53%) ⬇️
met-api/src/met_api/resources/staff_user.py 91.25% <ø> (-2.45%) ⬇️
met-api/src/met_api/services/authorization.py 88.88% <ø> (ø)
met-api/src/met_api/services/keycloak.py 85.07% <ø> (+14.29%) ⬆️
met-api/src/met_api/services/membership_service.py 73.41% <100.00%> (-15.93%) ⬇️
met-api/src/met_api/utils/constants.py 100.00% <ø> (+5.00%) ⬆️
met-api/src/met_api/utils/enums.py 100.00% <100.00%> (ø)
...mentFormTabs/UserManagement/AddTeamMemberModal.tsx 52.56% <ø> (ø)
...s/userManagement/listing/UserManagementContext.tsx 70.90% <ø> (ø)
... and 7 more

... and 3 files with indirect coverage changes

Copy link
Collaborator

@Baelx Baelx left a comment

Choose a reason for hiding this comment

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

Things look good! Thanks for doing this.
Could you please just remove logging like print() and console.log() if they're not needed. I had put them there for testing but we can remove them if they're not serving any other purpose

@@ -14,19 +14,19 @@

"""Tests to verify the user membership operations.

Test-Suite to ensure that the user membership endpoints are working as expected.
Test-Suite to ensure that the user membership endpoints are working as expected. # noqa: E501
Copy link
Collaborator

Choose a reason for hiding this comment

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

What does this mean here?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

some codes and docstrings exceeded the max length when we commented it out that's why there is a # noqa: E501 to ignore that flake8 warning for the time being as we are gonna uncomment those functions in the near future

@@ -36,6 +36,7 @@ import { HTTP_STATUS_CODES } from 'constants/httpResponseCodes';
export const AddToEngagementModal = () => {
const { savedUser, addUserModalOpen, setAddUserModalOpen, getUserMemberships, getUserDetails } =
useContext(UserDetailsContext);
console.log('user', savedUser);
Copy link
Collaborator

Choose a reason for hiding this comment

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

We can remove the logging for now. I should mentioned some calls were still present in the code

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

removed

Copy link

sonarqubecloud bot commented Feb 7, 2024

Quality Gate Passed Quality Gate passed

The SonarCloud Quality Gate passed, but some issues were introduced.

46 New issues
0 Security Hotspots
No data about Coverage
0.0% Duplication on New Code

See analysis details on SonarCloud

@ratheesh-aot ratheesh-aot merged commit 23faaae into bcgov:main Feb 7, 2024
14 of 15 checks passed
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