Skip to content

Commit

Permalink
Merge pull request jumpserver#3680 from jumpserver/dev
Browse files Browse the repository at this point in the history
Dev
  • Loading branch information
BaiJiangJie authored Feb 3, 2020
2 parents 1c2feed + ec1f667 commit 3cc9e0a
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
3 changes: 2 additions & 1 deletion apps/authentication/backends/openid/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,8 @@ def _update_or_create(self, token_response):
defaults={
'email': userinfo.get('email', ''),
'first_name': userinfo.get('given_name', ''),
'last_name': userinfo.get('family_name', '')
'last_name': userinfo.get('family_name', ''),
'name': userinfo.get('name', '')
}
)
oidt_profile = OpenIDTokenProfile(
Expand Down
5 changes: 5 additions & 0 deletions apps/terminal/api/terminal.py
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,11 @@ def handle_status(self, request):

def handle_sessions(self):
sessions_id = self.request.data.get('sessions', [])
# guacamole 上报的 session 是字符串
# "[53cd3e47-210f-41d8-b3c6-a184f3, 53cd3e47-210f-41d8-b3c6-a184f4]"
if isinstance(sessions_id, str):
sessions_id = sessions_id[1:-1].split(',')
sessions_id = [sid.strip() for sid in sessions_id if sid.strip()]
Session.set_sessions_active(sessions_id)

def get_queryset(self):
Expand Down

0 comments on commit 3cc9e0a

Please sign in to comment.