add logged out view as landing page after oidc logout redirect
This commit is contained in:
parent
bf954a9614
commit
ee2ed32767
5 changed files with 53 additions and 0 deletions
|
|
@ -40,3 +40,24 @@
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
</metal:login>
|
</metal:login>
|
||||||
|
|
||||||
|
|
||||||
|
<metal:loggedout define-macro="loggedout"
|
||||||
|
i18n:domain="loops"
|
||||||
|
tal:define="principal request/principal/id">
|
||||||
|
<h2 i18n:translate="">Logged out</h2>
|
||||||
|
<div>
|
||||||
|
<p i18n:translate=""
|
||||||
|
tal:condition="python: principal == 'zope.anybody'">Your have been successfully logged out from this application. Please login again if needed or close this browser tab</p>
|
||||||
|
<p i18n:translate=""
|
||||||
|
tal:condition="python: principal != 'zope.anybody'">
|
||||||
|
You are not authorized to perform this action. However, you may login as a
|
||||||
|
different user who is authorized.</p>
|
||||||
|
<div class="row">
|
||||||
|
<button i18n:translate="">
|
||||||
|
<a i18n:translate=""
|
||||||
|
tal:attributes="href view/baseUrl">Log in again</a></button>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</metal:loggedout>
|
||||||
|
|
|
||||||
|
|
@ -57,6 +57,24 @@ class Logout(object):
|
||||||
return nx
|
return nx
|
||||||
|
|
||||||
|
|
||||||
|
class Loggedout(NodeView):
|
||||||
|
|
||||||
|
template = template
|
||||||
|
|
||||||
|
@Lazy
|
||||||
|
def macro(self):
|
||||||
|
return self.template.macros['loggedout']
|
||||||
|
|
||||||
|
@Lazy
|
||||||
|
def item(self):
|
||||||
|
return self
|
||||||
|
|
||||||
|
@Lazy
|
||||||
|
def baseUrl(self):
|
||||||
|
url = self.menu.url
|
||||||
|
return url
|
||||||
|
|
||||||
|
|
||||||
class Unauthorized(ConceptView):
|
class Unauthorized(ConceptView):
|
||||||
|
|
||||||
isTopLevel = True
|
isTopLevel = True
|
||||||
|
|
|
||||||
|
|
@ -44,6 +44,11 @@
|
||||||
class="loops.browser.auth.Logout"
|
class="loops.browser.auth.Logout"
|
||||||
permission="zope.View" />
|
permission="zope.View" />
|
||||||
|
|
||||||
|
<page for="loops.interfaces.INode"
|
||||||
|
name="loggedout.html"
|
||||||
|
class="loops.browser.auth.Loggedout"
|
||||||
|
permission="zope.View" />
|
||||||
|
|
||||||
<!-- see also view/adapter "login.html" in section "query views" -->
|
<!-- see also view/adapter "login.html" in section "query views" -->
|
||||||
|
|
||||||
<!-- macros -->
|
<!-- macros -->
|
||||||
|
|
|
||||||
Binary file not shown.
|
|
@ -604,9 +604,18 @@ msgstr "Nicht angemeldet"
|
||||||
msgid "Log in"
|
msgid "Log in"
|
||||||
msgstr "Anmelden"
|
msgstr "Anmelden"
|
||||||
|
|
||||||
|
msgid "Log in again"
|
||||||
|
msgstr "Erneut anmelden"
|
||||||
|
|
||||||
msgid "Presence"
|
msgid "Presence"
|
||||||
msgstr "Anwesenheit"
|
msgstr "Anwesenheit"
|
||||||
|
|
||||||
|
msgid "Logged out"
|
||||||
|
msgstr "Abgemeldet"
|
||||||
|
|
||||||
|
msgid "Your have been successfully logged out from this application. Please login again if needed or close this browser tab"
|
||||||
|
msgstr "Sie haben sich erfolgreich von dieser Anwendung abgemeldet. Bitte loggen Sie sich bei Bedarf wieder ein oder schließen Sie das Browserfenster"
|
||||||
|
|
||||||
# general
|
# general
|
||||||
|
|
||||||
msgid "Actions"
|
msgid "Actions"
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue