Commit 577bbfd1 authored by Romain Courteaud's avatar Romain Courteaud

slapos_jio: do not display the authentication form if user is not anonymous

OfficeJS's user blocking third party cookie will at least stop entering their credentials many times for nothing
parent 32a292da
...@@ -7,7 +7,8 @@ ...@@ -7,7 +7,8 @@
<link rel="stylesheet" href="zocial.min.css"> <link rel="stylesheet" href="zocial.min.css">
</head> </head>
<body tal:define="form_action string:WebSite_login;"> <body tal:define="form_action string:WebSite_login;
portal here/getPortalObject">
<div data-role='page'> <div data-role='page'>
<div data-gadget-scope='header'> <div data-gadget-scope='header'>
...@@ -39,7 +40,13 @@ ...@@ -39,7 +40,13 @@
</tal:block> </tal:block>
</section> </section>
</div> </div>
<section> <section tal:condition="not: portal/portal_membership/isAnonymousUser">
<p i18n:domain="ui" i18n:translate="" >It seems you're already authenticated.</p>
<p><a tal:condition="exists: request/came_from"
tal:attributes="href request/came_from" >Go back</a></p>
</section>
<section tal:condition="portal/portal_membership/isAnonymousUser">
<form method="post" tal:attributes="action python: '%s/' % context.absolute_url()"> <form method="post" tal:attributes="action python: '%s/' % context.absolute_url()">
<div class="ui-field-contain"> <div class="ui-field-contain">
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment