mirror of
https://gitlab.com/crafty-controller/crafty-4.git
synced 2024-08-30 18:23:09 +00:00
Fixing Role Deletion
This commit is contained in:
parent
5a0789faa5
commit
a180d80f5b
@ -24,7 +24,7 @@ from app.classes.minecraft.stats import Stats
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
class Roles_Controller:
|
||||
|
||||
|
||||
@staticmethod
|
||||
def get_all_roles():
|
||||
return roles_helper.get_all_roles()
|
||||
@ -70,14 +70,15 @@ class Roles_Controller:
|
||||
|
||||
@staticmethod
|
||||
def remove_role(role_id):
|
||||
server_permissions.delete_roles_permissions(role_id)
|
||||
role_data = Roles_Controller.get_role_with_servers(role_id)
|
||||
server_permissions.delete_roles_permissions(role_id, role_data['servers'])
|
||||
users_helper.remove_roles_from_role_id(role_id)
|
||||
return roles_helper.remove_role(role_id)
|
||||
|
||||
@staticmethod
|
||||
def role_id_exists(role_id):
|
||||
return roles_helper.role_id_exists(role_id)
|
||||
|
||||
|
||||
@staticmethod
|
||||
def get_role_with_servers(role_id):
|
||||
role = roles_helper.get_role(role_id)
|
||||
|
Loading…
Reference in New Issue
Block a user