FIX: Mark invited admins as 'approved' (#7459)
This prevents invited admins appearing as no-op reviewables in the queue when invite_only or require_approval is enabled.
This commit is contained in:
parent
583226d295
commit
5edb5c8b03
|
@ -503,6 +503,7 @@ class Admin::UsersController < Admin::AdminController
|
|||
end
|
||||
|
||||
user.active = true
|
||||
user.approved = true
|
||||
user.save!
|
||||
user.grant_admin!
|
||||
user.change_trust_level!(4)
|
||||
|
|
|
@ -796,6 +796,8 @@ RSpec.describe Admin::UsersController do
|
|||
expect(u.name).to eq("Bill")
|
||||
expect(u.username).to eq("bill22")
|
||||
expect(u.admin).to eq(true)
|
||||
expect(u.active).to eq(true)
|
||||
expect(u.approved).to eq(true)
|
||||
end
|
||||
|
||||
it "doesn't send the email with send_email falsey" do
|
||||
|
|
Loading…
Reference in New Issue