mirror of
https://gitlab.com/crafty-controller/crafty-4.git
synced 2024-08-30 18:23:09 +00:00
Revert
This commit is contained in:
parent
4bb798fd0c
commit
e827460a18
@ -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):
|
||||
|
@ -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 = "********"
|
||||
|
Loading…
Reference in New Issue
Block a user