Skip to content
Snippets Groups Projects
Commit c4e3d271 authored by Mario Hegyi's avatar Mario Hegyi Committed by SaltNPepa
Browse files

Update view option visibility

Update the visibility for the view section in create discussion
to only display it if the user have a 'can moderate' permission
and not based on the role

closes VICE-5025

flag=discussion_default_sort,discussion_default_expand

Test plan:
- In the new discussion based on the permission display the
view settings
- (in default) as a teacher should see it
- a student shouldn't
- mascareding a student should show it
- clicking on the view as student on discussion page, the options
should be also hidden

Change-Id: Iee699323766745e5698576e9271a5396ccc359fa
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/370181


Tested-by: default avatarService Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: default avatarTheo Sorriaux <theo.sorriaux@instructure.com>
QA-Review: Roland Beres <roland.beres@instructure.com>
Product-Review: Balint Kartyas <balint.kartyas@instructure.com>
parent 952deed7
No related branches found
Tags release/2025-03-12.8
No related merge requests found
......@@ -99,7 +99,7 @@ export const useShouldShowContent = (
ENV.allow_student_anonymous_discussion_topics)
const shouldShowViewSettings =
!isStudent &&
ENV.DISCUSSION_TOPIC?.PERMISSIONS?.CAN_MODERATE &&
!isAnnouncement &&
(ENV.DISCUSSION_DEFAULT_EXPAND_ENABLED || ENV.DISCUSSION_DEFAULT_SORT_ENABLED)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment