Skip to content

Commit

Permalink
Merge pull request #126 from CMIPT/hotfix
Browse files Browse the repository at this point in the history
Fix a bug, can not get repo details as collaborators
  • Loading branch information
Kaiser-Yang authored Feb 27, 2025
2 parents 4b95d82 + 89953f7 commit 1a0b289
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -189,9 +189,9 @@ public RepositoryVO getRepository(
if (repository == null) {
throw new GenericException(ErrorCodeEnum.REPOSITORY_NOT_FOUND, notFoundMessage);
}
String idInToken = JwtUtil.getId(accessToken);
Long idInToken = Long.valueOf(JwtUtil.getId(accessToken));
if (repository.getIsPrivate()
&& !idInToken.equals(repository.getUserId().toString())
&& !idInToken.equals(repository.getUserId())
&& userCollaborateRepositoryService.getOne(
new QueryWrapper<UserCollaborateRepositoryPO>()
.eq("collaborator_id", idInToken)
Expand Down

0 comments on commit 1a0b289

Please sign in to comment.