mirror of
https://github.com/zulip/zulip.git
synced 2026-07-06 21:18:58 +08:00
message_edit: Hide recipient bar resolve topic if user lacks permission.
Previously, the "resolve/unresolve topic" checkmark option was displayed in recipient bars was presented to users regardless of whether they had permission to resolve topics in that stream, which was confusing. Fixes #19880.
This commit is contained in:
parent
3b29c61409
commit
f30e439ee3
@ -128,6 +128,8 @@ function set_topic_edit_properties(group, message) {
|
||||
group.realm_allow_message_editing = page_params.realm_allow_message_editing;
|
||||
group.always_visible_topic_edit = false;
|
||||
group.on_hover_topic_edit = false;
|
||||
// if a user who can edit a topic, can resolve it as well
|
||||
group.user_can_resolve_topic = message_edit.is_topic_editable(message);
|
||||
|
||||
// Messages with no topics should always have an edit icon visible
|
||||
// to encourage updating them. Admins can also edit any topic.
|
||||
|
||||
@ -50,10 +50,12 @@
|
||||
{{/if}}
|
||||
{{/if}}
|
||||
|
||||
{{#if topic_is_resolved}}
|
||||
<i class="fa fa-check on_hover_topic_unresolve recipient_bar_icon hidden-for-spectators" data-topic-name="{{topic}}" data-tippy-content="{{t 'Mark as unresolved' }}" role="button" tabindex="0" aria-label="{{t 'Mark as unresolved' }}"></i>
|
||||
{{else}}
|
||||
<i class="fa fa-check on_hover_topic_resolve recipient_bar_icon hidden-for-spectators" data-topic-name="{{topic}}" data-tippy-content="{{t 'Mark as resolved' }}" role="button" tabindex="0" aria-label="{{t 'Mark as resolved' }}"></i>
|
||||
{{#if user_can_resolve_topic}}
|
||||
{{#if topic_is_resolved}}
|
||||
<i class="fa fa-check on_hover_topic_unresolve recipient_bar_icon hidden-for-spectators" data-topic-name="{{topic}}" data-tippy-content="{{t 'Mark as unresolved' }}" role="button" tabindex="0" aria-label="{{t 'Mark as unresolved' }}"></i>
|
||||
{{else}}
|
||||
<i class="fa fa-check on_hover_topic_resolve recipient_bar_icon hidden-for-spectators" data-topic-name="{{topic}}" data-tippy-content="{{t 'Mark as resolved' }}" role="button" tabindex="0" aria-label="{{t 'Mark as resolved' }}"></i>
|
||||
{{/if}}
|
||||
{{/if}}
|
||||
|
||||
{{#if topic_muted}}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user