From 2e5175919cbe8f1dd48e30bd4977b57112cd85bc Mon Sep 17 00:00:00 2001 From: "Lopes Marc (loma)" Date: Tue, 25 Jul 2023 15:39:38 +0200 Subject: [PATCH] [IMP] website_profile,*: specify reason for profile access denial MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit *: website_forum, website_slides Purpose ======= Website profiles of users like Mitchell Admin, which are set as "public", are also rendered as "Private". In Fact, users can be denied access to the public profile of other users for different reasons. In such situations, users should get a more accurate feedback on the reason of the access denial. Specifications ============== On profile access denial, give users a more accurate reason: - "This profile is private!" when the profile is indeed private or the karma of the user profile is equal to 0. -"Not have enough karma to view other users' profile." when the profile is public but the requesting user has insufficient karma rights. Also: - Redirect to the 404 page users trying to access a non-existing profile. Note: the minimum level of karma required to access a public profile is now editable. See odoo/odoo#123411 Task-3360050 closes odoo/odoo#128686 Related: odoo/upgrade#4955 Signed-off-by: Stéphane Debauche (std) --- .../views/website_profile_templates.xml | 6 ++-- addons/website_profile/controllers/main.py | 30 ++++++++++++------- .../website_profile/views/website_profile.xml | 8 ++--- .../website_slides_templates_profile.xml | 6 ++-- 4 files changed, 29 insertions(+), 21 deletions(-) diff --git a/addons/website_forum/views/website_profile_templates.xml b/addons/website_forum/views/website_profile_templates.xml index 64ffd51e3d7..cb0c253de9c 100644 --- a/addons/website_forum/views/website_profile_templates.xml +++ b/addons/website_forum/views/website_profile_templates.xml @@ -1,8 +1,8 @@ - -