From e509673f7b304f73ca2c3dc19c64b4b2d493240c Mon Sep 17 00:00:00 2001 From: Bertrand Zuchuat Date: Mon, 7 Feb 2022 10:50:53 +0100 Subject: [PATCH] interface: keep the viewcode in the urls The change of the user's data as well as the change of the password has been transferred to the Angular user profile. * Removes the "edit my profile" menu entry. * Removes the "Change password" menu entry. * Closes #2195. Co-Authored-by: Bertrand Zuchuat --- rero_ils/config.py | 9 +++++ .../templates/rero_ils/ill_request_form.html | 2 +- rero_ils/modules/ill_requests/views.py | 12 ++++--- .../templates/rero_ils/patron_profile.html | 2 +- rero_ils/modules/patrons/views.py | 18 +++++----- rero_ils/modules/users/views.py | 36 ++++++++++++++++--- rero_ils/theme/menus.py | 34 +++++------------- tests/api/users/test_users_rest.py | 32 +++++++++++++---- tests/ui/ill_requests/test_ill_requests_ui.py | 3 +- 9 files changed, 94 insertions(+), 54 deletions(-) diff --git a/rero_ils/config.py b/rero_ils/config.py index 362a5c5f40..9ba333c899 100644 --- a/rero_ils/config.py +++ b/rero_ils/config.py @@ -257,6 +257,15 @@ def _(x): #: proxies) removes these headers again before sending the response to the #: client. Set to False, in case of doubt. ACCOUNTS_USERINFO_HEADERS = False + +# User profile +RERO_PUBLIC_USERPROFILES_READONLY = False +RERO_PUBLIC_USERPROFILES_READONLY_FIELDS = [ + 'first_name', + 'last_name', + 'birth_date' +] + # Disable User Profiles USERPROFILES = True USERPROFILES_COUNTRIES = get_profile_countries diff --git a/rero_ils/modules/ill_requests/templates/rero_ils/ill_request_form.html b/rero_ils/modules/ill_requests/templates/rero_ils/ill_request_form.html index fcf3f59b10..55651a03e1 100644 --- a/rero_ils/modules/ill_requests/templates/rero_ils/ill_request_form.html +++ b/rero_ils/modules/ill_requests/templates/rero_ils/ill_request_form.html @@ -27,7 +27,7 @@

{{ _('Caution!') }}

{{ _('A well detailed request is more likely to be satisfied') }}

-
+ {{ form.hidden_tag() }} {%- if form.csrf_token and form.csrf_token.errors %}