Skip to content

Commit

Permalink
Rubocop fix
Browse files Browse the repository at this point in the history
  • Loading branch information
lslezak committed Nov 14, 2024
1 parent 3b5a13c commit ee8a986
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
3 changes: 3 additions & 0 deletions service/.rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,3 +28,6 @@ Lint/UselessAssignment:
# be less strict
Metrics/AbcSize:
Max: 32

Metrics/ParameterLists:
Max: 6
9 changes: 6 additions & 3 deletions service/lib/agama/dbus/users.rb
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,8 @@ def issues
USERS_INTERFACE = "org.opensuse.Agama.Users1"
private_constant :USERS_INTERFACE

FUSER_SIG = "in FullName:s, in UserName:s, in Password:s, in EncryptedPassword:b, in AutoLogin:b, in data:a{sv}"
FUSER_SIG = "in FullName:s, in UserName:s, in Password:s, in EncryptedPassword:b, " \
"in AutoLogin:b, in data:a{sv}"
private_constant :FUSER_SIG

dbus_interface USERS_INTERFACE do
Expand Down Expand Up @@ -97,9 +98,11 @@ def issues
dbus_method :SetFirstUser,
# It returns an Struct with the first field with the result of the operation as a boolean
# and the second parameter as an array of issues found in case of failure
FUSER_SIG + ", out result:(bas)" do |full_name, user_name, password, encrypted_password, auto_login, data|
FUSER_SIG + ", out result:(bas)" do
|full_name, user_name, password, encrypted_password, auto_login, data|
logger.info "Setting first user #{full_name}"
user_issues = backend.assign_first_user(full_name, user_name, password, encrypted_password, auto_login, data)
user_issues = backend.assign_first_user(full_name, user_name, password,
encrypted_password, auto_login, data)

if user_issues.empty?
dbus_properties_changed(USERS_INTERFACE, { "FirstUser" => first_user }, [])
Expand Down

0 comments on commit ee8a986

Please sign in to comment.