Display the OAuth association only in "account" page.

Improved the template to show only when pertinent.
This commit is contained in:
2015-07-16 15:49:14 +02:00
parent 3c0122d98f
commit 769c14caf8
3 changed files with 18 additions and 16 deletions

View File

@@ -266,10 +266,12 @@ feature -- Hooks
a_response.location.starts_with ("account/roc-oauth-login")
then
get_block_view_login (a_block_id, a_response)
elseif a_block_id.is_case_insensitive_equal_general ("account") then
elseif a_block_id.is_case_insensitive_equal_general ("account") and then
a_response.location.same_string ("account")
then
if
attached template_block ("account_info", a_response) as l_tpl_block and then
attached current_user (a_response.request) as l_user
attached a_response.user as l_user
then
associate_account (l_user, a_response.values)
a_response.add_block (l_tpl_block, "content")