Improved can see permission for admin and technician
This commit is contained in:
parent
ef0fab1178
commit
3b79a61bb6
@ -79,6 +79,14 @@ class QueryABC(ObjectType):
|
|||||||
permissions: PermissionService = services.get_service(PermissionService)
|
permissions: PermissionService = services.get_service(PermissionService)
|
||||||
bot: DiscordBotServiceABC = services.get_service(DiscordBotServiceABC)
|
bot: DiscordBotServiceABC = services.get_service(DiscordBotServiceABC)
|
||||||
|
|
||||||
|
if user.auth_role == AuthRoleEnum.admin:
|
||||||
|
return True
|
||||||
|
|
||||||
|
for u in user.users:
|
||||||
|
guild = bot.get_guild(u.server.discord_id)
|
||||||
|
if permissions.is_member_technician(guild.get_member(u.discord_id)):
|
||||||
|
return True
|
||||||
|
|
||||||
access = False
|
access = False
|
||||||
if type(element) == Achievement:
|
if type(element) == Achievement:
|
||||||
element: Achievement = element
|
element: Achievement = element
|
||||||
|
Loading…
Reference in New Issue
Block a user