From e827460a182a3cc4e9fad3a5e237b0644c7d1f43 Mon Sep 17 00:00:00 2001 From: Andrew Date: Fri, 6 Aug 2021 01:13:58 -0400 Subject: [PATCH] Revert --- app/classes/shared/models.py | 6 ------ app/classes/web/panel_handler.py | 8 ++------ 2 files changed, 2 insertions(+), 12 deletions(-) diff --git a/app/classes/shared/models.py b/app/classes/shared/models.py index 0cf56ef4..4402d02a 100644 --- a/app/classes/shared/models.py +++ b/app/classes/shared/models.py @@ -431,12 +431,6 @@ class db_shortcuts: server_data.append({'server_data': s, "stats": db_helper.return_rows(latest)[0]}) return server_data - @staticmethod - def get_user_roles(user_id): - user_roles = User_Roles.select().where(User_Roles.user_id == user_id) - return user_roles - - @staticmethod def get_authorized_servers_stats_from_roles(user_id): diff --git a/app/classes/web/panel_handler.py b/app/classes/web/panel_handler.py index 1ef75245..dab6af8f 100644 --- a/app/classes/web/panel_handler.py +++ b/app/classes/web/panel_handler.py @@ -254,12 +254,8 @@ class PanelHandler(BaseHandler): self.redirect("/panel/server_detail?id={}&subpage=backup".format(server_id)) elif page == 'panel_config': - if exec_user['superuser'] == 1: - page_data['users'] = db_helper.get_all_users() - page_data['roles'] = db_helper.get_all_roles() - else: - page_data['users'] = db_helper.get_user(exec_user_id) - page_data['roles'] = db_helper.get_user_roles(exec_user_id) + page_data['users'] = db_helper.get_all_users() + page_data['roles'] = db_helper.get_all_roles() for user in page_data['users']: if user.user_id != exec_user['user_id']: user.api_token = "********"