sous-chefs / users

Development repository for the users cookbook
https://supermarket.chef.io/cookbooks/users
Apache License 2.0
138 stars 218 forks source link

Set a default for users property #451

Closed Fuuzetsu closed 3 years ago

Fuuzetsu commented 3 years ago

I fix a typo on the same line while there.

Fixes #450

Check List

Fuuzetsu commented 3 years ago

I've added a CHANGELOG entry.

EMH333 commented 3 years ago

Will this actually create the group?

https://github.com/sous-chefs/users/blob/master/resources/manage.rb#L53-L61, where the group is created, is within the users loop so it won't be run with an empty array. Please correct me if I am wrong!

I think that group block needs to be brought out of the users loop

Fuuzetsu commented 3 years ago

Will this actually create the group?

https://github.com/sous-chefs/users/blob/master/resources/manage.rb#L53-L61, where the group is created, is within the users loop so it won't be run with an empty array. Please correct me if I am wrong!

I think that group block needs to be brought out of the users loop

I think you're absolutely right: I just kind of assumed it worked: the test has to be improved and the group creation should just be checked for and created once, irrespective of users. I'll see what I can do on Monday.

Fuuzetsu commented 3 years ago

It took a few tries but I manage to pull out the group code out of the users loop and I added a test that verifies that the group is actually created and does not have any members in it. PTAL.

Apologies for it being now Thursday evening rather than Monday...

ramereth commented 3 years ago

@Fuuzetsu looks like we need to fix the InSpec on MacOS. I have a commit which will fix it but maintainers don't have access on this PR to push to the branch. Can you please allow maintainers access so I can do that?

Fuuzetsu commented 3 years ago

I have a commit which will fix it but maintainers don't have access on this PR to push to the branch. Can you please allow maintainers access so I can do that?

It appears this can only be done if the fork is on a user account while the branch is on organisation account ;/

If you post the patch somewhere, I can put it into the branch. Or you can take this commit, apply the patch, push it in and just close the PR, I don't mind either way.

ramereth commented 3 years ago

@Fuuzetsu you can cherry-pick this commit https://github.com/sous-chefs/users/commit/3290af8588c1cf83bc6b61637850e60bebcddad2

Fuuzetsu commented 3 years ago

@Fuuzetsu you can cherry-pick this commit 3290af8

Done, CI seems to pass.

kitchen-porter commented 3 years ago

Released as: 6.0.2