add simple Unauthorized view
This commit is contained in:
parent
ee2ed32767
commit
3a5b33f529
1 changed files with 8 additions and 0 deletions
|
|
@ -54,6 +54,14 @@ class LoginPageSelect(LoginPage):
|
||||||
return 'document.cookie=`loops_auth_method=${this.value}; path=/; expires=Sun, 31 Jan 2027 12:00:00 UTC%s`' % (domain and f'; domain={domain}' or '')
|
return 'document.cookie=`loops_auth_method=${this.value}; path=/; expires=Sun, 31 Jan 2027 12:00:00 UTC%s`' % (domain and f'; domain={domain}' or '')
|
||||||
|
|
||||||
|
|
||||||
|
class Unauthorized(LoginPage):
|
||||||
|
|
||||||
|
def __call__(self):
|
||||||
|
print(f'*** unauthorized: user = {self.request.principal.id}, authMethod = {self.authMethod}')
|
||||||
|
return "Unauthorized"
|
||||||
|
#return super(Unauthorized, self).__call__()
|
||||||
|
|
||||||
|
|
||||||
def getConfigAuthMethod():
|
def getConfigAuthMethod():
|
||||||
return getattr(config, 'authentication_method', 'legacy')
|
return getattr(config, 'authentication_method', 'legacy')
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue