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(role-update): Settings User Role | Ask user to relogin once the role has been updated #6742

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

CodeWithShagun
Copy link

@CodeWithShagun CodeWithShagun commented Jan 2, 2025

…role has been updated

Summary

This PR is about:

  • Implemented a Select dropdown to allow users to select a ROLE based on their needs.
  • Handled type definitions wherever necessary.
  • Since the role is being updated from the frontend, the backend must accept the ROLE key in the API to create roles based on
    the provided input.
    PLEASE WATCH THE BELOW VIDEO:
    https://jam.dev/c/5609dbc7-1302-413c-bbc7-533116bbf3fd
    PAYLOAD SENT TO BACKEND TO HANDLE

image

Related Issues / PR's

Screenshots

NA

Affected Areas and Manually Tested Areas


Important

Add role update feature with re-login prompt in user settings.

  • Behavior:
    • Adds role update functionality in editUser.ts by including Role in the API request payload.
    • Implements a Select dropdown in UserInfo/index.tsx for role selection, updating state with setChangedRole.
    • Triggers re-login notification and logout if the role changes.
  • Types:
    • Updates Props in types/api/user/editUser.ts to include role.
    • Adds role to User interface in types/reducer/app.ts.

This description was created by Ellipsis for d633f9b. It will automatically update as commits are pushed.

Copy link

welcome bot commented Jan 2, 2025

Welcome to the SigNoz community! Thank you for your first pull request and making this project better. 🤗

@CLAassistant
Copy link

CLAassistant commented Jan 2, 2025

CLA assistant check
All committers have signed the CLA.

@CodeWithShagun CodeWithShagun changed the title feat(role-update): Settings User Role | Ask user to relogin once the … feat(role-update): Settings User Role | Ask user to relogin once the role has been updated Jan 2, 2025
Copy link
Contributor

@ellipsis-dev ellipsis-dev bot left a comment

Choose a reason for hiding this comment

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

👍 Looks good to me! Reviewed everything up to d633f9b in 42 seconds

More details
  • Looked at 128 lines of code in 4 files
  • Skipped 0 files when reviewing.
  • Skipped posting 2 drafted comments based on config settings.
1. frontend/src/container/MySettings/UserInfo/index.tsx:61
  • Draft comment:
						role: changedRole || 'ADMIN',
  • Reason this comment was not posted:
    Comment looked like it was already resolved.
2. frontend/src/container/MySettings/UserInfo/index.tsx:72
  • Draft comment:
    Consider calling Logout() after the notification to ensure the user sees the message before being logged out.
  • Reason this comment was not posted:
    Confidence changes required: 50%
    The Logout function should be called after the notification to ensure the user sees the message before being logged out.

Workflow ID: wflow_8wsLES9DpS1vWT5Z


You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet mode, and more.

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.

2 participants