Skip to content

Commit

Permalink
IBX-8477: Removed check whether the draft belongs to the user (#1291)
Browse files Browse the repository at this point in the history
Co-authored-by: Mateusz Dębiński <mateusz.debinski@ibexa.co>
  • Loading branch information
mateuszdebinski and Mateusz Dębiński authored Jul 22, 2024
1 parent 4186da8 commit f7e0ae0
Showing 1 changed file with 2 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -107,19 +107,16 @@
{% block action_btns_content %}
{{ custom_actions_column }}
{% if is_draft_conflict %}
{% set edit_draft_disabled = (version.author and version.author.id != ibexa_admin_ui_config.user.user.id) %}
<a
href="{{ edit_url }}"
class="btn ibexa-btn ibexa-btn--ghost ibexa-btn--no-text {% if edit_draft_disabled %}ibexa-btn--prevented{% endif %}"
class="btn ibexa-btn ibexa-btn--ghost ibexa-btn--no-text"
title="{{ 'tab.versions.table.action.draft.edit'|trans|desc('Edit') }}"
{% if edit_draft_disabled %}disabled{% endif %}
>
<svg class="ibexa-icon ibexa-icon--small ibexa-icon--edit">
<use xlink:href="{{ ibexa_icon_path('edit') }}"></use>
</svg>
</a>
{% elseif is_draft %}
{% set edit_draft_disabled = (version.author and version.author.id != ibexa_admin_ui_config.user.user.id) %}
<button
data-content-draft-edit-url="{{ edit_url }}"
data-version-has-conflict-url="{{ path('ibexa.version.has_no_conflict', {
Expand All @@ -129,9 +126,8 @@
}) }}"
data-content-id="{{ version.contentInfo.id }}"
data-language-code="{{ version.initialLanguageCode }}"
class="btn ibexa-btn ibexa-btn--ghost ibexa-btn--no-text mx-2 ibexa-btn--content-draft-edit {% if edit_draft_disabled %}ibexa-btn--prevented{% endif %}"
class="btn ibexa-btn ibexa-btn--ghost ibexa-btn--no-text mx-2 ibexa-btn--content-draft-edit"
title="{{ 'tab.versions.table.action.draft.edit'|trans|desc('Edit') }}"
{% if edit_draft_disabled %}disabled{% endif %}
>
<svg class="ibexa-icon ibexa-icon--small ibexa-icon--edit">
<use xlink:href="{{ ibexa_icon_path('edit') }}"></use>
Expand Down

0 comments on commit f7e0ae0

Please sign in to comment.