Skip to content

Commit

Permalink
Merge pull request #356 from joseivanlopez/fix-writer
Browse files Browse the repository at this point in the history
Fix UsersModule::Reader
  • Loading branch information
joseivanlopez committed Nov 12, 2021
2 parents 34d8aac + 0e097dc commit 737318b
Show file tree
Hide file tree
Showing 2 changed files with 127 additions and 120 deletions.
4 changes: 2 additions & 2 deletions src/lib/y2users/users_module/reader.rb
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ def read_users(system_config, target_config)
all_local = Yast::Users.GetUsers("uid", "local").values +
Yast::Users.GetUsers("uid", "system").values
all_local.each do |user_hash|
if user_hash["what"] == "add_user" # new user
if user_hash["modified"] == "added" # new user
target_config.attach(user(user_hash, target_config))
else # everything else is edit of different kinds
# at first create original user
Expand All @@ -127,7 +127,7 @@ def read_groups(system_config, target_config)
all_local = Yast::Users.GetGroups("cn", "local").values +
Yast::Users.GetGroups("cn", "system").values
all_local.each do |group_hash|
if group_hash["what"] == "add_group" # new group
if group_hash["modified"] == "added" # new group
target_config.attach(group(group_hash))
else # everything else is edit of different kinds
# at first create original group
Expand Down

0 comments on commit 737318b

Please sign in to comment.