diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2023-12-06 19:03:46 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2023-12-06 19:03:46 +0300 |
commit | be44a258256ec9ba12876f56449078fcbb1431e0 (patch) | |
tree | 29d2db031ba56e2e2b2fde7f7e6287d553a5b58b /app | |
parent | 202d84e543578c3ab47295400a1b9b25bbb3bb67 (diff) |
Add latest changes from gitlab-org/gitlab@16-6-stable-ee
Diffstat (limited to 'app')
-rw-r--r-- | app/workers/users/deactivate_dormant_users_worker.rb | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/app/workers/users/deactivate_dormant_users_worker.rb b/app/workers/users/deactivate_dormant_users_worker.rb index 33c54f07521..5cd1d2938ee 100644 --- a/app/workers/users/deactivate_dormant_users_worker.rb +++ b/app/workers/users/deactivate_dormant_users_worker.rb @@ -18,8 +18,10 @@ module Users admin_bot = Users::Internal.admin_bot return unless admin_bot - deactivate_users(User.dormant, admin_bot) - deactivate_users(User.with_no_activity, admin_bot) + Gitlab::Auth::CurrentUserMode.bypass_session!(admin_bot.id) do + deactivate_users(User.dormant, admin_bot) + deactivate_users(User.with_no_activity, admin_bot) + end end private |