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
|
||||
def authMethod(self):
|
||||
if getConfigAuthMethod() == 'cookie':
|
||||
meth = getConfigAuthMethod()
|
||||
if meth == 'cookie':
|
||||
return getAuthMethodCookieValue(self.request)
|
||||
return 'legacy'
|
||||
return meth
|
||||
|
||||
@Lazy
|
||||
def oidc_allowed(self):
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue