diff --git a/bot/src/bot_graphql/mutations/user_mutation.py b/bot/src/bot_graphql/mutations/user_mutation.py index e203deb8..8d5fb779 100644 --- a/bot/src/bot_graphql/mutations/user_mutation.py +++ b/bot/src/bot_graphql/mutations/user_mutation.py @@ -4,6 +4,7 @@ from cpl_core.database.context import DatabaseContextABC from cpl_discord.service import DiscordBotServiceABC from bot_api.route.route import Route +from bot_core.service.permission_service import PermissionService from bot_data.abc.level_repository_abc import LevelRepositoryABC from bot_data.abc.server_repository_abc import ServerRepositoryABC from bot_data.abc.user_repository_abc import UserRepositoryABC @@ -13,7 +14,6 @@ from bot_data.model.user_role_enum import UserRoleEnum from bot_graphql.abc.query_abc import QueryABC from modules.base.service.user_warnings_service import UserWarningsService from modules.level.service.level_service import LevelService -from bot_core.service.permission_service import PermissionService class UserMutation(QueryABC): @@ -50,7 +50,7 @@ class UserMutation(QueryABC): member = self._bot.get_guild(user.server.discord_id).get_member( auth_user.users.where(lambda x: x.server.id == user.server.id).single().discord_id ) - if member.id != user.discord_id: + if self._permissions.is_member_moderator(member) or member.id != user.discord_id: self._can_user_mutate_data(user.server, UserRoleEnum.moderator) new_xp = None diff --git a/web/src/app/modules/view/server/profile/profile.component.html b/web/src/app/modules/view/server/profile/profile.component.html index ba88ccfe..c5c6fd3d 100644 --- a/web/src/app/modules/view/server/profile/profile.component.html +++ b/web/src/app/modules/view/server/profile/profile.component.html @@ -33,7 +33,8 @@