Build(deps-dev): Bump rubocop from 1.68.0 to 1.69.0 (#29947)

* Build(deps-dev): Bump rubocop from 1.68.0 to 1.69.0

Bumps [rubocop](https://github.com/rubocop/rubocop) from 1.68.0 to 1.69.0.
- [Release notes](https://github.com/rubocop/rubocop/releases)
- [Changelog](https://github.com/rubocop/rubocop/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rubocop/rubocop/compare/v1.68.0...v1.69.0)

---
updated-dependencies:
- dependency-name: rubocop
  dependency-type: indirect
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

* autofix

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Jarek Radosz <jradosz@gmail.com>
This commit is contained in:
dependabot[bot] 2024-11-27 01:51:01 +01:00 committed by GitHub
parent 2ef9d6ac47
commit c129d20322
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 12 additions and 10 deletions

View File

@ -455,16 +455,16 @@ GEM
rspec-core (>= 2.14) rspec-core (>= 2.14)
rtlcss (0.2.1) rtlcss (0.2.1)
mini_racer (>= 0.6.3) mini_racer (>= 0.6.3)
rubocop (1.68.0) rubocop (1.69.0)
json (~> 2.3) json (~> 2.3)
language_server-protocol (>= 3.17.0) language_server-protocol (>= 3.17.0)
parallel (~> 1.10) parallel (~> 1.10)
parser (>= 3.3.0.2) parser (>= 3.3.0.2)
rainbow (>= 2.2.2, < 4.0) rainbow (>= 2.2.2, < 4.0)
regexp_parser (>= 2.4, < 3.0) regexp_parser (>= 2.4, < 3.0)
rubocop-ast (>= 1.32.2, < 2.0) rubocop-ast (>= 1.36.1, < 2.0)
ruby-progressbar (~> 1.7) ruby-progressbar (~> 1.7)
unicode-display_width (>= 2.4.0, < 3.0) unicode-display_width (>= 2.4.0, < 4.0)
rubocop-ast (1.36.1) rubocop-ast (1.36.1)
parser (>= 3.3.1.0) parser (>= 3.3.1.0)
rubocop-capybara (2.21.0) rubocop-capybara (2.21.0)
@ -563,7 +563,9 @@ GEM
uglifier (4.2.1) uglifier (4.2.1)
execjs (>= 0.3.0, < 3) execjs (>= 0.3.0, < 3)
unf (0.2.0) unf (0.2.0)
unicode-display_width (2.6.0) unicode-display_width (3.1.2)
unicode-emoji (~> 4.0, >= 4.0.4)
unicode-emoji (4.0.4)
unicorn (6.1.0) unicorn (6.1.0)
kgio (~> 2.6) kgio (~> 2.6)
raindrops (~> 0.7) raindrops (~> 0.7)

View File

@ -38,7 +38,7 @@ module SecondFactorManager
end end
def authenticate_totp(token) def authenticate_totp(token)
totps = self&.user_second_factors&.totps totps = self.user_second_factors&.totps
authenticated = false authenticated = false
totps.each do |totp| totps.each do |totp|
last_used = 0 last_used = 0
@ -64,18 +64,18 @@ module SecondFactorManager
def totp_enabled? def totp_enabled?
!SiteSetting.enable_discourse_connect && SiteSetting.enable_local_logins && !SiteSetting.enable_discourse_connect && SiteSetting.enable_local_logins &&
self&.user_second_factors&.totps&.exists? self.user_second_factors&.totps&.exists?
end end
def backup_codes_enabled? def backup_codes_enabled?
!SiteSetting.enable_discourse_connect && SiteSetting.enable_local_logins && !SiteSetting.enable_discourse_connect && SiteSetting.enable_local_logins &&
self&.user_second_factors&.backup_codes&.exists? self.user_second_factors&.backup_codes&.exists?
end end
def security_keys_enabled? def security_keys_enabled?
!SiteSetting.enable_discourse_connect && SiteSetting.enable_local_logins && !SiteSetting.enable_discourse_connect && SiteSetting.enable_local_logins &&
self self
&.security_keys .security_keys
&.where(factor_type: UserSecurityKey.factor_types[:second_factor], enabled: true) &.where(factor_type: UserSecurityKey.factor_types[:second_factor], enabled: true)
&.exists? &.exists?
end end
@ -101,7 +101,7 @@ module SecondFactorManager
end end
def remaining_backup_codes def remaining_backup_codes
self&.user_second_factors&.backup_codes&.count self.user_second_factors&.backup_codes&.count
end end
def authenticate_second_factor(params, secure_session) def authenticate_second_factor(params, secure_session)
@ -244,7 +244,7 @@ module SecondFactorManager
def authenticate_backup_code(backup_code) def authenticate_backup_code(backup_code)
if !backup_code.blank? if !backup_code.blank?
codes = self&.user_second_factors&.backup_codes codes = self.user_second_factors&.backup_codes
codes.each do |code| codes.each do |code|
parsed_data = JSON.parse(code.data) parsed_data = JSON.parse(code.data)