Skip to content
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

Would you accept a PR to disable users during restore? #34

Open
WGriffing opened this issue Apr 10, 2023 · 3 comments
Open

Would you accept a PR to disable users during restore? #34

WGriffing opened this issue Apr 10, 2023 · 3 comments

Comments

@WGriffing
Copy link

The backup json files include the Enabled boolean attribute, but in my experience this value is not utilized during the restore.

As a result, previously disabled, backed-up accounts are no longer disabled after restoring from that backup.

It's easy enough to handle this case outside of this tool, but since I've gotten a lot of mileage out of the tool I would be happy to contribute back if there is interest.

@mifi
Copy link
Owner

mifi commented Apr 12, 2023

How would you do that during restore? sounds like somethign we could add, maybe behind a CLI flag

@WGriffing
Copy link
Author

WGriffing commented Apr 12, 2023

How would you do that during restore? sounds like somethign we could add, maybe behind a CLI flag

Similar to how you are doing the groups. At some point after the user is created, add logic to the effect of:

if( user.Disabled === false) {
  AdminDisableUser(...)
}

I'd try to make the case that this should be the default behavior so the restored state more closely matches the backed-up state, but I wouldn't argue against a CLI flag to disable the proposed behavior.

@mifi
Copy link
Owner

mifi commented Apr 12, 2023

sound good to me

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants