Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
a26e9352
Commit
a26e9352
authored
Sep 23, 2021
by
Sheldon Led
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Change `pending_user_count` to rely only on user blocked count
parent
a9fecf61
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
0 additions
and
14 deletions
+0
-14
app/helpers/application_settings_helper.rb
app/helpers/application_settings_helper.rb
+0
-2
spec/helpers/application_settings_helper_spec.rb
spec/helpers/application_settings_helper_spec.rb
+0
-12
No files found.
app/helpers/application_settings_helper.rb
View file @
a26e9352
...
@@ -477,8 +477,6 @@ module ApplicationSettingsHelper
...
@@ -477,8 +477,6 @@ module ApplicationSettingsHelper
end
end
def
pending_user_count
def
pending_user_count
return
0
if
Gitlab
::
CurrentSettings
.
new_user_signups_cap
.
blank?
User
.
blocked_pending_approval
.
count
User
.
blocked_pending_approval
.
count
end
end
end
end
...
...
spec/helpers/application_settings_helper_spec.rb
View file @
a26e9352
...
@@ -271,18 +271,6 @@ RSpec.describe ApplicationSettingsHelper do
...
@@ -271,18 +271,6 @@ RSpec.describe ApplicationSettingsHelper do
expect
(
pending_user_count
).
to
eq
1
expect
(
pending_user_count
).
to
eq
1
end
end
end
end
context
'when the new_user_signups_cap is not present'
do
let
(
:user_cap
)
{
nil
}
it
{
is_expected
.
to
eq
0
}
it
'does not query users unnecessarily'
do
expect
(
User
).
not_to
receive
(
:blocked_pending_approval
)
pending_user_count
end
end
end
end
describe
'#sidekiq_job_limiter_modes_for_select'
do
describe
'#sidekiq_job_limiter_modes_for_select'
do
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment