Passa al contenuto
Menu
È necessario essere registrati per interagire con la community.
La domanda è stata contrassegnata
3 Risposte
11280 Visualizzazioni

Hi,

I would like to know if I could display a login page to my users as a frontpage and deny the non-logged users access to the website.

I tried editing the access rights for "website" and "access_website_menu" with a specific group that all my users have, but if I change any of them (or both) I cannot access the login page.

Thanks for your help,


Avatar
Abbandona
Risposta migliore

Have you see the Website Security App?

"Give availability to restrict website menus and pages to some groups"

https://www.odoo.com/apps/modules/9.0/website_security/

Avatar
Abbandona
Autore

Hi Ray, Thanks for the module name, I hadn't seen it yet. I installed it and I could hide the menu elements from an anonymous user. But it seems to work fine with pages, but when I tried to hide the shop (/shop) it hides it, but you can still access it if you enter the correct URL. Any idea what I am not doing right ? Cheers

Risposta migliore

Hello clement

if not request.session.uid:    
    return login_redirect()

you can write on your website controllers maybe it will work for v9 bcoz it works for v8 if user not login then it automatically redirect this to login page when user tries to access website

Avatar
Abbandona
Risposta migliore

Have you tried login to shop module?

https://apps.odoo.com/apps/modules/12.0/login_to_shop/

Avatar
Abbandona
Post correlati Risposte Visualizzazioni Attività
2
gen 25
5552
0
mar 21
3152
0
feb 25
939
2
ott 24
859
1
set 24
1311