Skip to content

Commit

Permalink
Feature #22: update links to verify the access key
Browse files Browse the repository at this point in the history
- update mail templates to use the new verification URL
- update the accept invitation form to include and use
  the global OAuth login support
  • Loading branch information
stcarrez committed Nov 20, 2022
1 parent 6b59686 commit dcbcf99
Show file tree
Hide file tree
Showing 5 changed files with 28 additions and 35 deletions.
5 changes: 2 additions & 3 deletions awa/plugins/awa-mail/web/mail/invite-user-email.xhtml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ You have been invited by #{event.inviter} to join #{initParam['app_name']}.

To accept this invitation, please go to the following URL:

#{initParam['app_url_base']}/auth/invitation.html?key=#{event.key}
#{initParam['app_url_base']}/auth/invitation/#{event.key}

Thank you for using #{initParam['app_name']}.

Expand All @@ -43,8 +43,7 @@ You have been invited by #{event.inviter} to join #{initParam['app_name']}.
To accept this invitation, please go to the following URL:
</p>

<a href="#{initParam['app_url_base']}/auth/invitation.html?key=#{event.key}">
#{initParam['app_url_base']}/auth/invitation.html?key=#{event.key}</a>
<a href="#{initParam['app_url_base']}/auth/invitation/#{event.key}">#{initParam['app_url_base']}/auth/invitation/#{event.key}</a>

<p>
Thank you for using #{initParam['app_name']}.
Expand Down
6 changes: 3 additions & 3 deletions awa/plugins/awa-mail/web/mail/user-lost-password-email.xhtml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ do not have to worry about your account being taken over.

To choose a new password, please go to the following URL:

#{initParam['app_url_base']}/auth/change-password.html?key=#{event.key}
#{initParam['app_url_base']}/auth/change-password/#{event.key}

Thank you for using #{initParam['app_name']}.

Expand Down Expand Up @@ -53,8 +53,8 @@ do not have to worry about your account being taken over.
To choose a new password, please go to the following URL:
</p>

<a href="#{initParam['app_url_base']}/auth/change-password.html?key=#{event.key}">
#{initParam['app_url_base']}/auth/change-password.html?key=#{event.key}</a>
<a href="#{initParam['app_url_base']}/auth/change-password/#{event.key}">
#{initParam['app_url_base']}/auth/change-password/#{event.key}</a>

<p>
Thank you for using #{initParam['app_name']}.
Expand Down
5 changes: 2 additions & 3 deletions awa/plugins/awa-mail/web/mail/user-register-email.xhtml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ and with the email address #{event.email}.

To finish the registration process, click on the following link:

#{initParam['app_url_base']}/auth/validate.html?key=#{event.key}
#{initParam['app_url_base']}/auth/validate/#{event.key}

Sincerely,

Expand All @@ -41,8 +41,7 @@ and with the email address #{event.email}.
To finish the registration process, click on the following link:
</p>

<a href="#{initParam['app_url_base']}/auth/validate.html?key=#{event.key}">
#{initParam['app_url_base']}/auth/validate.html?key=#{event.key}</a>
<a href="#{initParam['app_url_base']}/auth/validate/#{event.key}">#{initParam['app_url_base']}/auth/validate/#{event.key}</a>

<p>
Sincerely,
Expand Down
13 changes: 13 additions & 0 deletions awa/plugins/awa-workspaces/config/workspaces.xml
Original file line number Diff line number Diff line change
Expand Up @@ -131,13 +131,26 @@
<filter-mapping>
<filter-name>service</filter-name>
<url-pattern>/workspaces/*.html</url-pattern>
<url-pattern>/workspaces/accept-invitation/#{inviteUser.key}</url-pattern>
<url-pattern>/auth/invitation/#{inviteUser.key}</url-pattern>
</filter-mapping>

<filter-mapping>
<filter-name>auth-filter</filter-name>
<url-pattern>/workspaces/*.html</url-pattern>
<url-pattern>/workspaces/accept-invitation/#{inviteUser.key}</url-pattern>
</filter-mapping>

<url-mapping>
<pattern>/auth/invitation/#{inviteUser.key}</pattern>
<view-id>/auth/invitation.html</view-id>
</url-mapping>

<url-mapping>
<pattern>/workspaces/accept-invitation/#{inviteUser.key}</pattern>
<view-id>/workspaces/accept-nvitation.html</view-id>
</url-mapping>

<url-policy>
<description>
Security rule to allow only logged users to access the workspace.
Expand Down
34 changes: 8 additions & 26 deletions awa/plugins/awa-workspaces/web/auth/forms/accept-form.xhtml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
xmlns:c="http://java.sun.com/jstl/core"
xmlns:util="http://code.google.com/p/ada-asf/util"
xmlns:h="http://java.sun.com/jsf/html"
class='awa-login ui-widget ui-widget-content ui-corner-all'>
class='awa-accept-invitation ui-widget ui-widget-content ui-corner-all'>
<h2>
<h:outputFormat value="#{workspaceMsg.workspace_invite_message}">
<f:param value="#{inviteUser.inviter}"/>
Expand All @@ -34,34 +34,16 @@
#{workspaceMsg.workspace_accept_invitation_message}
</p>
</div>
<util:set var="redirect" value="#{contextPath}/workspaces/accept-invitation.html?key=#{inviteUser.key}"/>
<ul class='openid-login openid-invite'>
<li>
<a href="#{contextPath}/auth/auth/yahoo?redirect=#{util:urlEncode(redirect)}" title="#{userMsg.openid_yahoo_auth}" class='openid-yahoo'>
<em/>
</a>
</li>
<li>
<a href="#{contextPath}/auth/auth/google-plus?redirect=#{util:urlEncode(redirect)}" title="#{userMsg.openid_google_plus_auth}" class='openid-google-plus'>
<em/>
</a>
</li>
<li>
<a href="#{contextPath}/auth/auth/facebook?redirect=#{util:urlEncode(redirect)}" title="#{userMsg.openid_facebook_auth}" class='openid-facebook'>
<em/>
</a>
</li>
<li>
<a href="#{contextPath}/auth/auth/orange?redirect=#{util:urlEncode(redirect)}" title="#{userMsg.openid_orange_auth}" class='openid-orange'>
<em/>
</a>
</li>
</ul>
<div class="openid-separator">
<c:if test="#{initParam.app_login_openid}">
<ui:include src="/auth/forms/login-openid.xhtml">
<ui:param name="redirect" value="#{contextPath}/workspaces/accept-invitation.html?key=#{inviteUser.key}"/>
</ui:include>
<div class="openid-separator">
<div class="openid-sep-left"/>
<div class="openid-sep-text">#{workspaceMsg.workspace_invite_alternate_or_message}</div>
<div class="openid-sep-right"/>
</div>
</div>
</c:if>
<div class="invite-action">
<p>#{workspaceMsg.workspace_invite_signup_alternative_message}</p>
</div>
Expand Down

0 comments on commit dcbcf99

Please sign in to comment.