Skip to content

Commit 8160010

Browse files
Merge pull request #2132 from betagouv/hotfix/rights-reco-contact-editor
hotfix(conv): add correct right is_switchtender and is_staff on editor
2 parents 2bc892f + 7ff9aea commit 8160010

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

recoco/apps/projects/templates/projects/project/conversations_new.html

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
{{ feed|json_script:"djangoFeed" }}
2121
{{ user_project_perms|json_script:"userProjectPerms" }}
2222
{% is_project_owner project request.user as is_project_owner %}
23+
{% is_staff_for_current_site request.user as is_staff %}
2324
{{ is_project_owner|json_script:"isProjectOwner" }}
2425
{{ request.user.first_name|json_script:"djangoCurrentUserFirstName" }}
2526
{{ request.user.last_name|json_script:"djangoCurrentUserLastName" }}
@@ -122,7 +123,12 @@ <h3 class="fr-mt-2w conversation-new__topics-list-member-subtitle">Equipe de sui
122123
</p>
123124
</div>
124125
</template>
125-
{% if advising_position.is_advisor or isSwitchtender or request.user.is_staff %}
126+
{% comment %}
127+
advising_position.is_advisor : advisor on current project
128+
is_switchtender : advisor on current site
129+
is_staff : staff on current site
130+
{% endcomment %}
131+
{% if advising_position.is_advisor or is_switchtender or is_staff %}
126132
{% include "tools/editor.html" with model="message" input_name=posting_form.content.name initial_content=posting_form.content.value|default:'' errors=posting_form.content.errors input_required=True can_add_reco=True next_url_add_reco="projects-project-detail-conversations" can_attach_files=True can_attach_contact=True show_send_button=True form_id="conversation-form" placeholder="Écrivez votre message ici. Ajoutez des fichiers, contacts ou une recommandation…" can_compress_editor=True on_leave_alert=True is_notification_alert=True %}
127133
{% else %}
128134
{% include "tools/editor.html" with model="message" input_name=posting_form.content.name initial_content=posting_form.content.value|default:'' errors=posting_form.content.errors input_required=True can_add_reco=False next_url_add_reco="projects-project-detail-conversations" can_attach_files=True can_attach_contact=False show_send_button=True form_id="conversation-form" placeholder="Écrivez votre message ici. Vous pouvez ajouter des fichiers." can_compress_editor=True on_leave_alert=True is_notification_alert=True %}

0 commit comments

Comments
 (0)