Compare commits
2 commits
0c4eb97cd8
...
b06b38f83c
| Author | SHA1 | Date | |
|---|---|---|---|
| b06b38f83c | |||
| 0c843bf889 |
2 changed files with 7 additions and 3 deletions
|
|
@ -72,9 +72,10 @@ class LoginBase:
|
||||||
|
|
||||||
@Lazy
|
@Lazy
|
||||||
def authMethod(self):
|
def authMethod(self):
|
||||||
if getConfigAuthMethod() == 'cookie':
|
meth = getConfigAuthMethod()
|
||||||
|
if meth == 'cookie':
|
||||||
return getAuthMethodCookieValue(self.request)
|
return getAuthMethodCookieValue(self.request)
|
||||||
return 'legacy'
|
return meth
|
||||||
|
|
||||||
@Lazy
|
@Lazy
|
||||||
def oidc_allowed(self):
|
def oidc_allowed(self):
|
||||||
|
|
|
||||||
|
|
@ -86,7 +86,8 @@ class ApiHandler(ApiCommon, NodeView):
|
||||||
target = self.context.target
|
target = self.context.target
|
||||||
if target is not None:
|
if target is not None:
|
||||||
targetView = self.getContainerView(target)
|
targetView = self.getContainerView(target)
|
||||||
return targetView()
|
if targetView is not None:
|
||||||
|
return targetView()
|
||||||
# TODO: check for request.method?
|
# TODO: check for request.method?
|
||||||
if self.request.method in ('PUT', 'POST'):
|
if self.request.method in ('PUT', 'POST'):
|
||||||
return self.error('Method not allowed', 405)
|
return self.error('Method not allowed', 405)
|
||||||
|
|
@ -111,6 +112,8 @@ class ApiHandler(ApiCommon, NodeView):
|
||||||
if target is None:
|
if target is None:
|
||||||
return None
|
return None
|
||||||
cv = self.getContainerView(target)
|
cv = self.getContainerView(target)
|
||||||
|
if cv is None:
|
||||||
|
return None
|
||||||
targetView = cv.getView(name)
|
targetView = cv.getView(name)
|
||||||
if targetView is None:
|
if targetView is None:
|
||||||
return None
|
return None
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue