mirror of
https://github.com/dkmstr/openuds.git
synced 2025-01-03 01:17:56 +03:00
Fixed ticket access in restricted mode
This commit is contained in:
parent
b614c8fff6
commit
0173a06411
@ -250,7 +250,9 @@ def ticketAuth(
|
|||||||
usr # Temporarily store this user as "authenticated" user, next requests will be done using session
|
usr # Temporarily store this user as "authenticated" user, next requests will be done using session
|
||||||
)
|
)
|
||||||
request.authorized = True # User is authorized
|
request.authorized = True # User is authorized
|
||||||
request.session['ticket'] = '1' # Store that user access is done using ticket
|
|
||||||
|
# Set restricted access (no allow to see other services, logout automatically if user tries to access other service, ...)
|
||||||
|
request.session['restricted'] = True # Access is from ticket
|
||||||
|
|
||||||
# Transport must always be automatic for ticket authentication
|
# Transport must always be automatic for ticket authentication
|
||||||
|
|
||||||
|
@ -89,7 +89,6 @@ def index(request: HttpRequest) -> HttpResponse:
|
|||||||
# Includes a request.session ticket, indicating that
|
# Includes a request.session ticket, indicating that
|
||||||
@never_cache
|
@never_cache
|
||||||
def ticketLauncher(request: HttpRequest) -> HttpResponse:
|
def ticketLauncher(request: HttpRequest) -> HttpResponse:
|
||||||
request.session['restricted'] = True # Access is from ticket
|
|
||||||
return index(request)
|
return index(request)
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user