forked from shaba/openuds
Fixed guacamole urls && small pam fix
This commit is contained in:
parent
6e0292e76e
commit
c98933b6ed
@ -31,13 +31,11 @@
|
||||
@author: Adolfo Gómez, dkmaster at dkmon dot com
|
||||
"""
|
||||
from django.conf.urls import url
|
||||
from .views import guacamole
|
||||
from .views import guacamole, guacamole_authenticated
|
||||
|
||||
urlpatterns = [
|
||||
# Old, compat
|
||||
url(r'^guacamole/(?P<tunnelId>.+)$', guacamole, name='dispatcher.guacamole'),
|
||||
# New path
|
||||
url(r'^uds/guacamole/(?P<tunnelId>.+)$', guacamole, name='dispatcher.guacamole'),
|
||||
# Authenticated path
|
||||
url(r'^uds/guacamole/auth/(?P<authId>[^/]+)/(?P<tunnelId>.+)$', guacamole, name='dispatcher.guacamole'),
|
||||
url(r'^uds/guacamole/auth/(?P<authId>[^/]+)/(?P<tunnelId>.+)$', guacamole_authenticated, name='dispatcher.guacamole'),
|
||||
# Non authenticated path. Disabled
|
||||
# url(r'^uds/guacamole/(?P<tunnelId>.+)$', guacamole, name='dispatcher.guacamole.noauth'),
|
||||
]
|
||||
|
@ -35,6 +35,7 @@ import logging
|
||||
from django.http import HttpResponseNotAllowed, HttpResponse, HttpRequest
|
||||
from uds.models import TicketStore
|
||||
from uds.core.auths import auth
|
||||
from uds.core.util.request import ExtendedHttpRequestWithUser
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
@ -42,7 +43,7 @@ logger = logging.getLogger(__name__)
|
||||
|
||||
|
||||
@auth.trustedSourceRequired
|
||||
def pam(request: HttpRequest) -> HttpResponse:
|
||||
def pam(request: ExtendedHttpRequestWithUser) -> HttpResponse:
|
||||
response = ''
|
||||
if request.method == 'POST':
|
||||
return HttpResponseNotAllowed(['GET'])
|
||||
|
Loading…
x
Reference in New Issue
Block a user