Contributors mailing list archives
Re: Define permissions in website (frontend)by
Ygol InternetWork, Yves Goldberg
Thanks for your help Ruben, Simone and Remi.
I ended up adding the condition in the controller.
(It would be nice to have a generic module allowing adding a domain to a website page)
----- Original message -----
From: "Rémi CAZENAVE - Le Filament" <email@example.com>
To: Contributors <firstname.lastname@example.org>
Subject: Re: Define permissions in website (frontend)
Date: Thursday, September 24, 2020 10:01
You can also enable authentication for specific URI in proxy configuration, depending on your target architecture it might be easier to deploy than overriding Odoo controllers but it will not be configurable by end users.
Rémi CAZENAVE - SCOP Le Filament
De : Simone Orsi <email@example.com>
Envoyé : 24 septembre 2020 08:42:05 GMT+02:00
À : Contributors <firstname.lastname@example.org>
Objet : Re: Define permissions in website (frontend)
if the goal is to simply block login, you could override the login/authenticate method and raise a proper error.
If you want to block access to a specific route only, override it and raise proper exception when condition is not matched.
On Wed, Sep 23, 2020 at 5:07 PM Yves Goldberg <email@example.com> wrote:
Hello,How would I grant access to a website but only for a res_partner fulfilling a condition?user case is publishing a list that is only accessible to partners who have "condition = True".Another option would be to have a public page protected by a single password. Maybe in a popup?Is there a module that could help? any pointer?I was thinking to get in the controller, the user's id from the session and then conditionally return the required data but maybe there is an easier way?Thank you--Yves Goldbergodoo| Official Partner - OCA delegateOpen Source ERP, CRM & CMST +972 (3) 720 8818
M +972 (55) 966 1405T +32 (2) 588 2500--
Full stack Python web developer, Odoo specialist, Odoo Community Board Member, Freelance in love with open source.
Post to: mailto:firstname.lastname@example.org