This commit is contained in:
Andrew 2021-08-06 01:13:58 -04:00
parent 4bb798fd0c
commit e827460a18
2 changed files with 2 additions and 12 deletions

View File

@ -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):

View File

@ -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 = "********"