diff --git a/backend/src/main/java/io/papermc/hangar/service/internal/users/invites/InviteService.java b/backend/src/main/java/io/papermc/hangar/service/internal/users/invites/InviteService.java index c78949bc..654b4230 100644 --- a/backend/src/main/java/io/papermc/hangar/service/internal/users/invites/InviteService.java +++ b/backend/src/main/java/io/papermc/hangar/service/internal/users/invites/InviteService.java @@ -65,10 +65,13 @@ public abstract class InviteService, R extends Role @Transactional public void sendTransferRequest(final String user, final J joinable) { final UserTable userTable = this.userDAO.getUserTable(user); - // TODO transfer project to organization (and divert invite to owner) - if (userTable == null || userTable.isOrganization()) { + if (userTable == null) { throw new HangarApiException(this.errorPrefix + "invalidUser", user); } + // TODO transfer project to organization (and divert invite to owner) + if (userTable.getEmail().endsWith(this.config.org.dummyEmailDomain())) { + throw new HangarApiException("Org transfers are not implemented yet"); + } final List ownerRoles = this.roleService.getRoles(joinable.getId(), this.getOwnerRole()); if (ownerRoles.stream().anyMatch(rt -> rt.getUserId() != joinable.getOwnerId())) {