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

Minimal Admin Dashboard for Adding Users #119

Closed
pwdel opened this issue May 9, 2024 · 2 comments · Fixed by #141
Closed

Minimal Admin Dashboard for Adding Users #119

pwdel opened this issue May 9, 2024 · 2 comments · Fixed by #141

Comments

@pwdel
Copy link
Member

pwdel commented May 9, 2024

We should allow the following dashboard for an admin only.

Image

This should also allow setting a Display Name, and a randomly selected Emoji.

  • We already have a list of possible emojis.
  • After successful creation of user, should go to following page which shows password one time, which can be securely sent to the user by the admin.
@pwdel
Copy link
Member Author

pwdel commented May 19, 2024

We could create another, "resetpassword," table which forces a user to go to a reset password process upon first login. If the passwordresetneeded boolean is not cleared in postgres, then user is not able to visit other parts of the site.

@pwdel
Copy link
Member Author

pwdel commented May 23, 2024

Remaining To Do List on this Task:

Backend

Admin Validation Function:

✅ Implement a Golang validation function that verifies a user is an ADMIN before allowing them to perform the AddUser function.

  • Also, ensure username validation within AddUser function to enforce lowercase, uppercase letters and numbers only.

Change Password Route:

✅ Create a /changepassword route in the server that handles password change requests.

Change Password Function:

Develop a ChangePassword function in Golang that:

✅ Validates the user's current session.
✅ Hashes the new password.
✅ Updates the user's password in the database.

Password Change Validation Function:

✅ Create a ChangePasswordNeeded validation function to check if the user needs to change their password.

✅ Ensure that secure actions such as create, trade, etc., cannot be undertaken until the user has changed their password.

Frontend

Update Routes for Secure Actions:

✅ Modify routes to restrict access to certain actions like /create, ensuring they are inaccessible if the user needs to change their password.

ChangePassword.jsx Layout:

Design and implement a ChangePassword.jsx layout that includes:

✅ An input field for the new password.
✅ Instructions or guidelines on creating a secure password.
✅ A button to submit the new password.

Modify Sidebar for Conditional Access

✅ Adjust the sidebar to show only the "Change Password" option if the user has the MustChangePassword flag set to true.
Redirection After Password Change:

✅ Set up redirection to the /profile page or another appropriate page once the password change is successfully completed.
UI Feedback for Actions:

✅ Implement user feedback mechanisms for both successful and unsuccessful password updates, such as notifications or alerts.

Testing and Validation:

✅ Thoroughly test the new password change feature to ensure it works seamlessly across different scenarios and handles edge cases properly.

Documentation:

  • Update the system documentation to include information about the new password change requirement and its impact on user interaction with the system.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
1 participant