diff options
Diffstat (limited to 'app/models/user.rb')
-rw-r--r-- | app/models/user.rb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/app/models/user.rb b/app/models/user.rb index 47c5b3e208a..b9efbcdf502 100644 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -286,6 +286,10 @@ class User < ApplicationRecord end end + before_transition do + !Gitlab::Database.read_only? + end + # rubocop: disable CodeReuse/ServiceClass # Ideally we should not call a service object here but user.block # is also bcalled by Users::MigrateToGhostUserService which references |