[FIX] website_profile: allow administrators to update profiles

Before this commit, only the users who validated their email could change
their own profile. In addition to that behavior we let administrators update
all profiles.

Commit linked to task ID 1978530 (fixes linked to internal testing).
This commit is contained in:
qmo-odoo
2019-05-03 09:43:12 +00:00
committed by Thibault Delavallée
parent d5468974f7
commit f4b5b709a1
@@ -219,7 +219,7 @@
<h1 class="o_card_people_name">
<span t-field="user.name"/><small t-if="user.karma == 0"> (not verified)</small>
</h1>
<a class="btn btn-primary d-none d-md-inline-block" t-if="request.env.user == user and validation_email_done" t-attf-href="/profile/edit?url_param=#{edit_button_url_param}">
<a class="btn btn-primary d-none d-md-inline-block" t-if="request.env.user == user and validation_email_done or request.env.user._is_admin()" t-attf-href="/profile/edit?url_param=#{edit_button_url_param}">
<i class="fa fa-pencil mr-2"/>EDIT PROFILE
</a>
</div>