Skip to content

Commit

Permalink
Updated ADMIN dashboard to require SudoAdmin
Browse files Browse the repository at this point in the history
- This was an oversight, but users now have to verify their ADMIN account login before accessing anything sensitive
  • Loading branch information
tylerlight071 committed Feb 8, 2024
1 parent ef52432 commit 375561f
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,12 @@ You can now use this MongoDB URI to connect to your MongoDB database from Nexus
(You will set the password to your own on first login)
- To create a new user, go to User Management in the ADMIN Dashboard
- Go to Register New User
- Enter the desired username, password and user level. You can now log into the new user account.
(For resetting forgotten passwords, from User Management, enter Update user information, log in via Sudo ADMIN and simply reset the password to **'password'**)
## System Requirements 💻
Nexus Pet Portal is developed using Python. To run this application from the source code, you need:
Expand Down
8 changes: 8 additions & 0 deletions user_management.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@


def user_management():

SudoAdmin(users_collection.database).login()
# Continuous loop for user management options
while True:
clear_screen()
Expand Down Expand Up @@ -100,6 +102,9 @@ def update_user_level(username):
print(Fore.RED + "\nInvalid user level. Please enter a valid level." + Style.RESET_ALL)

def update_user_information():

SudoAdmin(users_collection.database).login()

username = get_username()
user = get_user(username)

Expand All @@ -126,6 +131,9 @@ def update_user_information():
time.sleep(2)

def delete_user():

SudoAdmin(users_collection.database).login()

# Prompt for username to be deleted
username = input("\nEnter the username to delete: ")
confirm_delete = input("Are you sure you want to delete this user? (y/n) ")
Expand Down

0 comments on commit 375561f

Please sign in to comment.