limit lots more stuff to non_shadow root accounts
Change-Id: I99f8edb00d912b31ca29cba32f724ac33330e4ab Reviewed-on: https://gerrit.instructure.com/194426 Reviewed-by: Rob Orton <rob@instructure.com> QA-Review: Rob Orton <rob@instructure.com> Product-Review: Rob Orton <rob@instructure.com> Tested-by: Jenkins
This commit is contained in:
parent
75fcbfecc6
commit
6b6cb86ca5
|
@ -18,7 +18,7 @@
|
|||
module Alerts
|
||||
class DelayedAlertSender
|
||||
def self.process
|
||||
Account.root_accounts.active.find_each do |account|
|
||||
Account.root_accounts.active.non_shadow.find_each do |account|
|
||||
next unless account.settings[:enable_alerts]
|
||||
account.all_courses.active.find_ids_in_batches(batch_size: 200) do |batch|
|
||||
self.send_later_if_production_enqueue_args(:evaluate_courses,
|
||||
|
|
|
@ -125,7 +125,7 @@
|
|||
<td><%= f.text_field :integration_id %></td>
|
||||
</tr>
|
||||
<% if can_do(Account.site_admin, @current_user, :manage_user_logins) %>
|
||||
<% js_env :PASSWORD_POLICIES => Hash[Account.root_accounts.active.map{ |a| [a.id, a.password_policy]}] %>
|
||||
<% js_env :PASSWORD_POLICIES => Hash[Account.root_accounts.active.non_shadow.map{ |a| [a.id, a.password_policy]}] %>
|
||||
<tr class="account_id">
|
||||
<td><%= f.blabel :account_id, :en => "Account" %></td>
|
||||
<td>
|
||||
|
|
|
@ -19,7 +19,7 @@ class GrandfatherSelfRegistration < ActiveRecord::Migration[4.2]
|
|||
tag :predeploy
|
||||
|
||||
def up
|
||||
Account.root_accounts.active.each do |account|
|
||||
Account.root_accounts.active.non_shadow.each do |account|
|
||||
next unless account.settings[:self_registration]
|
||||
|
||||
ap = account.authentication_providers.active.where(auth_type: 'canvas').first
|
||||
|
|
|
@ -20,7 +20,7 @@ class AddIdToDefaultHelpLinks < ActiveRecord::Migration[5.0]
|
|||
tag :postdeploy
|
||||
|
||||
def up
|
||||
Account.root_accounts.active.find_each do |a|
|
||||
Account.root_accounts.active.non_shadow.find_each do |a|
|
||||
default_links = a.help_links_builder.default_links
|
||||
next unless a.settings[:custom_help_links]
|
||||
|
||||
|
|
|
@ -41,7 +41,7 @@ class BrandConfigRegenerator
|
|||
if @account.site_admin?
|
||||
# note: this is only root accounts on the same shard as site admin
|
||||
@account.shard.activate do
|
||||
root_scope = Account.root_accounts.active.where.not(id: @account)
|
||||
root_scope = Account.root_accounts.active.non_shadow.where.not(id: @account)
|
||||
result.concat(root_scope.select(&:brand_config_md5))
|
||||
result.concat(SharedBrandConfig.where(account_id: root_scope))
|
||||
|
||||
|
|
|
@ -22,7 +22,7 @@ module DataFixup::MoveSubAccountGradingPeriodsToCourses
|
|||
end
|
||||
|
||||
def self.move_sub_account_periods_to_courses_without_grading_periods
|
||||
Account.root_accounts.active.find_each do |root_account|
|
||||
Account.root_accounts.active.non_shadow.find_each do |root_account|
|
||||
check_if_account_periods_need_copying(root_account)
|
||||
end
|
||||
end
|
||||
|
|
|
@ -27,7 +27,7 @@ class CountsReport
|
|||
def self.process_shard
|
||||
reporter = new
|
||||
|
||||
Account.root_accounts.active.each do |account|
|
||||
Account.root_accounts.active.non_shadow.each do |account|
|
||||
next if account.external_status == 'test'
|
||||
|
||||
reporter.process_account(account)
|
||||
|
|
Loading…
Reference in New Issue