feat: show create post button for users with publish permissions
Previously: Only staff users could see 'Create Post' button Now: Button visible for: - Staff users (is_staff), OR - Users with feed.publish_company_post permission, OR - Users with feed.publish_department_post permission This allows department managers and content creators to publish posts without needing full staff status.
This commit is contained in:
parent
d1b58d4c2d
commit
94e61ca9ed
@ -15,7 +15,8 @@
|
||||
<div class="col-12">
|
||||
|
||||
{# ===== НОВАЯ ШАПКА С КОМПОНЕНТОМ ===== #}
|
||||
{% if user.is_authenticated and user.is_staff %}
|
||||
{# Показываем кнопку создания для: staff ИЛИ тех, у кого есть права на публикацию #}
|
||||
{% if user.is_authenticated and user.is_staff or perms.feed.publish_company_post or perms.feed.publish_department_post %}
|
||||
{% include "includes/components/page_header.html" with icon="bi-megaphone" title="Лента" search_id="feedFilter" search_placeholder="Поиск по названию, автору или содержанию" create_as_card=True create_modal="createPostModal" create_text="Создать публикацию" %}
|
||||
{% else %}
|
||||
{% include "includes/components/page_header.html" with icon="bi-megaphone" title="Лента" search_id="feedFilter" search_placeholder="Поиск по названию, автору или содержанию" %}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user