Fix course title not showing on home front page
fixes LS-2605 flag=none We recently switched to checking VIEW_ALL_PAGES for VIEW_TOOLBAR as part of [this change](https://gerrit.instructure.com/c/canvas-lms/+/270314) which breaks for home pages because, unlike regular wiki show pages, display_show_all_pages is false (we don't want to show the All Pages button on the home page). VIEW_TOOLBAR hides or shows the course title on the home page so it needs to be true when course_home is true. There are additional permission checks within VIEW_TOOLBAR so this does not expose any other undesirable controls. Test plan: - Set a page as a front page - Set a course home page to that front page - View the course home as a student - The course title should be displayed Change-Id: I87b35a1c6bae16c7d092891015965b1817303d99 Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/273182 Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com> Reviewed-by: Robin Kuss <rkuss@instructure.com> QA-Review: Robin Kuss <rkuss@instructure.com> Product-Review: Nate Armstrong <narmstrong@instructure.com>
This commit is contained in:
parent
7a2b97edc9
commit
90c782599e
|
@ -315,3 +315,14 @@ testRights('CAN (manage, course home page)', {
|
|||
ACCESS_GEAR_MENU: true
|
||||
}
|
||||
})
|
||||
|
||||
testRights('CAN (view toolbar on course_home)', {
|
||||
course_home: true,
|
||||
display_show_all_pages: false,
|
||||
WIKI_RIGHTS: {
|
||||
manage: false
|
||||
},
|
||||
CAN: {
|
||||
VIEW_TOOLBAR: true
|
||||
}
|
||||
})
|
||||
|
|
|
@ -272,6 +272,7 @@ export default class WikiPageView extends Backbone.View {
|
|||
json.CAN.DIRECT_SHARE = !!ENV.DIRECT_SHARE_ENABLED
|
||||
json.CAN.ACCESS_GEAR_MENU = json.CAN.DELETE || json.CAN.READ_REVISIONS || json.CAN.DIRECT_SHARE
|
||||
json.CAN.VIEW_TOOLBAR =
|
||||
json.course_home ||
|
||||
json.CAN.VIEW_ALL_PAGES ||
|
||||
json.CAN.PUBLISH ||
|
||||
json.CAN.UPDATE_CONTENT ||
|
||||
|
|
Loading…
Reference in New Issue