DEV: Also fetch user when granting admin (#27382)

In some admin user controller extensions, @user is used to derive certain values.

The grant_admin method requires @user as well, so we are adding it here. This is tested in the plugin that it is used in.
This commit is contained in:
Natalie Tay 2024-06-07 15:50:53 +08:00 committed by GitHub
parent 9e6dc4c5c8
commit bc32ffdda8
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -8,6 +8,7 @@ class Admin::UsersController < Admin::StaffController
suspend suspend
unsuspend unsuspend
log_out log_out
grant_admin
revoke_admin revoke_admin
revoke_moderation revoke_moderation
grant_moderation grant_moderation