mirror of
https://github.com/discourse/discourse.git
synced 2024-11-23 01:16:38 -06:00
FEATURE: new 'staged' users list for admins
This commit is contained in:
parent
bfbdee6a57
commit
a9ebde5111
@ -10,6 +10,7 @@
|
||||
{{nav-item route='adminUsersList.show' routeParam='suspended' label='admin.users.nav.suspended'}}
|
||||
{{nav-item route='adminUsersList.show' routeParam='silenced' label='admin.users.nav.silenced'}}
|
||||
{{nav-item route='adminUsersList.show' routeParam='suspect' label='admin.users.nav.suspect'}}
|
||||
{{nav-item route='adminUsersList.show' routeParam='staged' label='admin.users.nav.staged'}}
|
||||
{{nav-item route='groups' label='groups.index.title'}}
|
||||
</ul>
|
||||
</nav>
|
||||
|
@ -3496,6 +3496,7 @@ en:
|
||||
suspended: 'Suspended'
|
||||
silenced: 'Silenced'
|
||||
suspect: 'Suspect'
|
||||
staged: 'Staged'
|
||||
approved: "Approved?"
|
||||
approved_selected:
|
||||
one: "approve user"
|
||||
@ -3518,6 +3519,7 @@ en:
|
||||
silenced: 'Silenced Users'
|
||||
suspended: 'Suspended Users'
|
||||
suspect: 'Suspect Users'
|
||||
staged: 'Staged Users'
|
||||
reject_successful:
|
||||
one: "Successfully rejected 1 user."
|
||||
other: "Successfully rejected %{count} users."
|
||||
|
@ -98,6 +98,7 @@ class AdminUserIndexQuery
|
||||
when 'suspended' then @query.suspended
|
||||
when 'pending' then @query.not_suspended.where(approved: false, active: true)
|
||||
when 'suspect' then suspect_users
|
||||
when 'staged' then @query.where(staged: true)
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -176,6 +176,17 @@ describe AdminUserIndexQuery do
|
||||
|
||||
end
|
||||
|
||||
describe "with a staged user" do
|
||||
|
||||
let!(:user) { Fabricate(:user, staged: true) }
|
||||
|
||||
it "finds the staged user" do
|
||||
query = ::AdminUserIndexQuery.new(query: 'staged')
|
||||
expect(query.find_users.count).to eq(1)
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
describe "filtering" do
|
||||
|
||||
context "exact email bypass" do
|
||||
|
Loading…
Reference in New Issue
Block a user