Compare commits

..

2 commits

2 changed files with 7 additions and 3 deletions

View file

@ -72,9 +72,10 @@ class LoginBase:
@Lazy
def authMethod(self):
if getConfigAuthMethod() == 'cookie':
meth = getConfigAuthMethod()
if meth == 'cookie':
return getAuthMethodCookieValue(self.request)
return 'legacy'
return meth
@Lazy
def oidc_allowed(self):

View file

@ -86,7 +86,8 @@ class ApiHandler(ApiCommon, NodeView):
target = self.context.target
if target is not None:
targetView = self.getContainerView(target)
return targetView()
if targetView is not None:
return targetView()
# TODO: check for request.method?
if self.request.method in ('PUT', 'POST'):
return self.error('Method not allowed', 405)
@ -111,6 +112,8 @@ class ApiHandler(ApiCommon, NodeView):
if target is None:
return None
cv = self.getContainerView(target)
if cv is None:
return None
targetView = cv.getView(name)
if targetView is None:
return None