Add new permission for viewing announcements
Fixes CNVS-26824 Test plan: - Go to an account's permissions page - Ensure that a permission titled "View Announcements" shows up - Ensure that all course roles have it by default Change-Id: Icfd19b4a218fcdadf43fd571a5362b76545cfabc Reviewed-on: https://gerrit.instructure.com/71725 Reviewed-by: Steven Burnett <sburnett@instructure.com> Reviewed-by: James Williams <jamesw@instructure.com> Tested-by: Jenkins QA-Review: Heath Hales <hhales@instructure.com> Product-Review: Allison Weiss <allison@instructure.com>
This commit is contained in:
parent
732352320b
commit
adac968389
|
@ -269,6 +269,7 @@ class RoleOverridesController < ApplicationController
|
|||
# read_forum -- [STADO] View discussions
|
||||
# moderate_forum -- [sTADo] Moderate discussions (delete/edit others' posts, lock topics)
|
||||
# post_to_forum -- [STADo] Post to discussions
|
||||
# read_announcements -- [STADO] View announcements
|
||||
# read_question_banks -- [ TADo] View and link to question banks
|
||||
# read_reports -- [ TAD ] View usage reports for the course
|
||||
# read_roster -- [STADo] See the list of users
|
||||
|
|
|
@ -148,6 +148,27 @@ class RoleOverride < ActiveRecord::Base
|
|||
'AccountAdmin'
|
||||
]
|
||||
},
|
||||
:read_announcements => {
|
||||
:label => lambda { t('View announcements') },
|
||||
:available_to => [
|
||||
'StudentEnrollment',
|
||||
'TaEnrollment',
|
||||
'DesignerEnrollment',
|
||||
'TeacherEnrollment',
|
||||
'TeacherlessStudentEnrollment',
|
||||
'ObserverEnrollment',
|
||||
'AccountAdmin',
|
||||
'AccountMembership'
|
||||
],
|
||||
:true_for => [
|
||||
'StudentEnrollment',
|
||||
'TaEnrollment',
|
||||
'DesignerEnrollment',
|
||||
'ObserverEnrollment',
|
||||
'TeacherEnrollment',
|
||||
'AccountAdmin'
|
||||
]
|
||||
},
|
||||
:send_messages => {
|
||||
:label => lambda { t('permissions.send_messages', "Send messages to individual course members") },
|
||||
:available_to => [
|
||||
|
|
|
@ -0,0 +1,10 @@
|
|||
class PopulateAnnouncementPermissions < ActiveRecord::Migration
|
||||
tag :postdeploy
|
||||
|
||||
def up
|
||||
DataFixup::AddRoleOverridesForNewPermission.send_later_if_production(:run, :view_forum, :view_announcements)
|
||||
end
|
||||
|
||||
def down
|
||||
end
|
||||
end
|
Loading…
Reference in New Issue