Skip to content

Commit

Permalink
Improve detection of added users and groups
Browse files Browse the repository at this point in the history
  • Loading branch information
joseivanlopez committed Nov 11, 2021
1 parent 34d8aac commit ce118fc
Showing 1 changed file with 2 additions and 2 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 ce118fc

Please sign in to comment.