You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I would like to remove the Blog toolbar button if a user does not have the rights to create a blog post on the current site.
Use cases
You're a user with the rights to publish blog posts only on a site (site A). You visit another website (site B) that's using the Django/Django-CMS/Djangocms-Blog multisite framework. You go on the blog, and see that the "Blog" toolbar menu is available. You select "Blog" > "Add Post...", and are greeted by a "Add Blog Article" popup. If you only have the rights to post on site A you won't be able to select the website to post the article, so you may think that you're creating a blog post on the current site (site B), when in reality you're creating a blog post on site A.
corentinbettiol
changed the title
Remove Blog toolbar if using multisite and current user does not have the rights to post blog post on current site
Remove Blog toolbar if using multisite and current user does not have the rights to create a blog post on the current site
Jan 25, 2023
Description
I would like to remove the Blog toolbar button if a user does not have the rights to create a blog post on the current site.
Use cases
You're a user with the rights to publish blog posts only on a site (site A). You visit another website (site B) that's using the Django/Django-CMS/Djangocms-Blog multisite framework. You go on the blog, and see that the "Blog" toolbar menu is available. You select "Blog" > "Add Post...", and are greeted by a "Add Blog Article" popup. If you only have the rights to post on site A you won't be able to select the website to post the article, so you may think that you're creating a blog post on the current site (site B), when in reality you're creating a blog post on site A.
Proposed solution
Add a condition alongside the
self.request.user.has_perm("djangocms_blog.add_post")
condition, maybeself.request.user.has_perm("djangocms_blog.add_post_current_site")
?The text was updated successfully, but these errors were encountered: