-
Notifications
You must be signed in to change notification settings - Fork 16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Delete users and groups #339
Conversation
42486c2
to
e867940
Compare
da38737
to
ac1eaa9
Compare
# rubocop:disable Metrics/PerceivedComplexity | ||
def usermod_options | ||
args = [] | ||
args << "--login" << user.name if user.name != initial_user.name && user.name |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe it makes sense to just always pass it? and if not, then I would maybe create method for it as it repeats often here.
# | ||
# Issues are generated when the home cannot be cleaned up. | ||
def run_action | ||
Yast::Execute.on_target!(FIND, user.home.path, "-mindepth", "1", "-delete") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
does find also find hidden files? and what about removing directory?
remove_home_content(user) if !reusing_home && commit_config.home_without_skel? | ||
set_home_ownership(user) if commit_config.adapt_home_ownership? | ||
set_password(user) if user.password | ||
set_auth_keys(user) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have to say that it looks a bit strange to call methods here. I expect that you fill list of actions as needed and then pass it to some method to execute all actions.
03bd245
to
c11b0b0
Compare
c11b0b0
to
2d6f566
Compare
Closing in favor of #341 |
https://trello.com/c/XcAKT8r0/2657-3-deleting-users-with-y2users