mirror of
https://gitlab.com/crafty-controller/crafty-4.git
synced 2024-08-30 18:23:09 +00:00
Still cleaning up my mess...sorry
This commit is contained in:
parent
890b487d52
commit
73d8be2d57
@ -499,8 +499,11 @@ class db_shortcuts:
|
|||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def server_id_authorized(serverId, user_id):
|
def server_id_authorized(serverId, user_id):
|
||||||
userServer = Role_Servers.select().where(Role_Servers.server_id == serverId)
|
authorized = 0
|
||||||
authorized = userServer.select().where(User_Roles.user_id == user_id)
|
user_roles = User_Roles.select().where(User_Roles.user_id == user_id)
|
||||||
|
for role in user_roles:
|
||||||
|
authorized = (Role_Servers.select().where(Role_Servers.role_id == role.role_id))
|
||||||
|
|
||||||
#authorized = db_helper.return_rows(authorized)
|
#authorized = db_helper.return_rows(authorized)
|
||||||
|
|
||||||
if authorized.count() == 0:
|
if authorized.count() == 0:
|
||||||
|
Loading…
Reference in New Issue
Block a user