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(user_groups): API client code to create, update and delete users and groups #981

Closed
wants to merge 5 commits into from

Conversation

NSSPKrishna
Copy link
Member

@NSSPKrishna NSSPKrishna commented Feb 1, 2023


pk/NR-76861, is required by newrelic/terraform-provider-newrelic#2227 (pk/NR-76866) in terraform-provider-newrelic


Summary

This PR adds queries, mutations and associated code via Tutone to

Create, update and delete users

mutation {
  userManagementCreateUser
}

mutation {
  userManagementUpdateUser
}

mutation {
  userManagementDeleteUser
}

Create, update and delete groups

mutation {
  userManagementCreateGroup
}

mutation {
  userManagementUpdateGroup
}

mutation {
  userManagementDeleteGroup
}

Fetch an authentication domain by its ID (get)

{
  actor {
    organization {
      userManagement {
        authenticationDomains
      }
    }
  }
}

Linked Jira Tickets

https://new-relic.atlassian.net/browse/NR-76855 (Users and Groups)
https://new-relic.atlassian.net/browse/NR-76861 (Authentication Domains)

@CLAassistant
Copy link

CLAassistant commented Feb 1, 2023

CLA assistant check
All committers have signed the CLA.

@pranav-new-relic pranav-new-relic changed the title Pk/nr 76861 feat(user_groups): API client code for user group association and authentication domains Dec 27, 2023
@pranav-new-relic pranav-new-relic changed the title feat(user_groups): API client code for user group association and authentication domains feat(user_groups): API client code to create, update and delete users and groups Dec 27, 2023
@codecov-commenter
Copy link

codecov-commenter commented Dec 27, 2023

Codecov Report

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

Comparison is base (38b50be) 37.33% compared to head (920ba92) 37.51%.
Report is 3 commits behind head on main.

Files Patch % Lines
pkg/usermanagement/usermanagement_api_queries.go 0.00% 78 Missing ⚠️
pkg/usermanagement/usermanagement_api.go 68.57% 27 Missing and 6 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #981      +/-   ##
==========================================
+ Coverage   37.33%   37.51%   +0.17%     
==========================================
  Files          83       86       +3     
  Lines        5373     5566     +193     
==========================================
+ Hits         2006     2088      +82     
- Misses       3217     3322     +105     
- Partials      150      156       +6     
Flag Coverage Δ
unit 37.51% <42.48%> (+0.17%) ⬆️

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

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

@pranav-new-relic
Copy link
Member

pranav-new-relic commented Jan 5, 2024

Important commit to refer to in future. Line 108
2c547c1

@pranav-new-relic
Copy link
Member

Things to do -

  • update the non-Tutone query to avoid querying users when groups are being used (we would only need groups and users in them for group management and user-group association)
  • update failing tests

@pranav-new-relic
Copy link
Member

Closing this PR, since this functionality has already been implemented (and the changes in this PR have been integrated elsewhere).

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.

4 participants