Skip to content

Commit 3ccd145

Browse files
authored
🐞 access token shouldn't be refreshed after stopping election (#364)
Parent issue: sequentech/meta#5482
1 parent 98519f6 commit 3ccd145

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

iam/api/views.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -792,6 +792,11 @@ def get(self, request, pk):
792792
if u and error is None:
793793
data = {}
794794
auth_event = get_object_or_404(AuthEvent, pk=pk)
795+
if auth_event.status in [AuthEvent.STOPPED, AuthEvent.SUSPENDED, AuthEvent.SUCCESS]:
796+
return json_response(
797+
status=400,
798+
error_codename=ErrorCodes.BAD_REQUEST
799+
)
795800
req = {}
796801
auth_data = return_auth_data('Ping', req, request, u, auth_event)
797802
if 'auth-token' in auth_data:

0 commit comments

Comments
 (0)