-
- Downloads
[FIX] website_slides: hide publish widget if user cannot publish
Purpose ======= The "publish/unpublish" widget is always shown on slide.channel/slide.slide for a website_publisher user even if he's not allowed to manage the publishing of the channel (see slide.channel.can_publish field). This commit will hide the widget on both the slide.channel and the slide.slide frontend pages if the user doesn't have the right to publish/unpublish. A generic solution implemented directly in the publish mixin has been chosen to ease understanding and allow easy reuse in other applications. Commit linked to task ID 1902304 (main elearning task). closes odoo/odoo#31187
No related branches found
No related tags found
Showing
- addons/website/models/mixins.py 34 additions, 1 deletionaddons/website/models/mixins.py
- addons/website/views/website_navbar_templates.xml 1 addition, 1 deletionaddons/website/views/website_navbar_templates.xml
- addons/website_slides/models/slide_channel.py 18 additions, 6 deletionsaddons/website_slides/models/slide_channel.py
- addons/website_slides/models/slide_slide.py 10 additions, 4 deletionsaddons/website_slides/models/slide_slide.py
- addons/website_slides/tests/test_security.py 5 additions, 0 deletionsaddons/website_slides/tests/test_security.py
Loading
Please register or sign in to comment