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

🐛 Fixed issue with user management #313

Merged
merged 1 commit into from
Oct 8, 2024

Conversation

abdheshnayak
Copy link
Member

@abdheshnayak abdheshnayak commented Oct 8, 2024

  • fixed issue with user management while removing the user from the team.

Summary by Sourcery

Fix the issue with user management by correcting the user ID reference in the team settings and update the success message for resource removal. Add user ID to the GraphQL query for listing memberships.

Bug Fixes:

  • Correct the user ID reference in the user management route to use the user's ID instead of their email.

Enhancements:

  • Update the success message when a resource is removed to use 'removed' instead of 'deleted' for clarity.

fixed error that occured while removing the user form the team.
Copy link

sourcery-ai bot commented Oct 8, 2024

Reviewer's Guide by Sourcery

This pull request addresses an issue with user management, specifically when removing a user from a team. The changes involve minor code formatting adjustments, updating user identification, modifying a success message, and adding a user ID field to GraphQL queries.

ER diagram for updated GraphQL queries

erDiagram
    USER {
        string name
        string joined
        string email
        string id
    }
    TEAM {
        string role
    }
    USER ||--o{ TEAM : "has role in"
    USER ||--o{ ACCOUNT : "is member of"
    ACCOUNT {
        string accountName
    }
Loading

Class diagram for UserAccessResources component

classDiagram
    class UserAccessResources {
        - showDeleteDialog: BaseType | null
        - showUserInvite: BaseType | null
        + reloadPage()
        + handleError(err)
    }
Loading

File-Level Changes

Change Details Files
Code formatting improvements
  • Removed unnecessary spaces inside empty function bodies
  • Removed trailing comma in function parameter
src/apps/console/server/gql/queries/account-queries.ts
src/apps/console/routes/_main+/$account+/settings+/user-management/user-access-resource.tsx
Updated user identification method
  • Changed user identification from email to id in team member mapping
src/apps/console/routes/_main+/$account+/settings+/user-management/route.tsx
Modified success message for user removal
  • Changed 'deleted successfully' to 'removed successfully' in toast message
src/apps/console/routes/_main+/$account+/settings+/user-management/user-access-resource.tsx
Added user ID field to GraphQL queries
  • Included 'id' field in consoleListMembershipsForAccount query
  • Updated access-queries to include 'id' field in user object
gql-queries-generator/doc/queries.graphql
src/apps/console/server/gql/queries/access-queries.ts

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time. You can also use
    this command to specify where the summary should be inserted.

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@abdheshnayak abdheshnayak merged commit ad32536 into release-v1.0.8 Oct 8, 2024
4 checks passed
@abdheshnayak abdheshnayak deleted the fix/user-management branch October 8, 2024 07:09
Copy link

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

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

Hey @abdheshnayak - I've reviewed your changes and they look great!

Here's what I looked at during the review
  • 🟢 General issues: all looks good
  • 🟢 Security: all looks good
  • 🟢 Testing: all looks good
  • 🟢 Complexity: all looks good
  • 🟢 Documentation: all looks good

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

abdheshnayak added a commit that referenced this pull request Oct 28, 2024
🐛 Fixed issue with user management
tulsiojha pushed a commit that referenced this pull request Nov 1, 2024
🐛 Fixed issue with user management
abdheshnayak added a commit that referenced this pull request Nov 5, 2024
🐛 Fixed issue with user management
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.

1 participant