Skip to content

Commit

Permalink
Fix read-only transaction exception for creating and revoking access …
Browse files Browse the repository at this point in the history
…tokens (fix #382)
  • Loading branch information
arteymix committed Dec 15, 2023
1 parent be0db80 commit 3c4ab28
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/main/java/ubc/pavlab/rdp/services/UserServiceImpl.java
Original file line number Diff line number Diff line change
Expand Up @@ -381,11 +381,13 @@ public UserGene anonymizeUserGene( UserGene userGene, UUID anonymousIdToReuse )
}

@Override
@Transactional
public void revokeAccessToken( AccessToken accessToken ) {
accessTokenRepository.delete( accessToken );
}

@Override
@Transactional
public AccessToken createAccessTokenForUser( User user ) {
AccessToken token = new AccessToken();
token.updateToken( createSecureRandomToken() );
Expand Down

0 comments on commit 3c4ab28

Please sign in to comment.