Commit e316958f authored by Rémy Coutable's avatar Rémy Coutable

Merge branch 'refresh-permissions-recent-users' into 'master'

Trigger refreshing of permissions in a migration

See merge request !8914
parents 32da7602 dbf414df
---
title: Reset users.authorized_projects_populated to automatically refresh user permissions
merge_request:
author:
# See http://doc.gitlab.com/ce/development/migration_style_guide.html
# for more information on how to write migrations for GitLab.
class ResetUsersAuthorizedProjectsPopulated < ActiveRecord::Migration
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
disable_ddl_transaction!
def up
# This ensures we don't lock all users for the duration of the migration.
update_column_in_batches(:users, :authorized_projects_populated, nil)
end
def down
# noop
end
end
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment