-
-
Notifications
You must be signed in to change notification settings - Fork 498
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
Add loopback_users parameter (adds ability to allow guest user to login remotely) #699
Merged
Merged
Changes from 11 commits
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
d06fd80
Introduces a new parameter allow_remote_connections, to change the de…
70fa0c6
Default value for the allow_remote_connections parameter, this doesn'…
ee01521
Pass the new allow_remote_connections parameter
cd0d316
Handles the configuration file with the new parameter
b00acb6
The test for the new parameter
371c818
Renames the new module variable to allow_remote_guest_connections
01241d5
Adds the new parameter loopback_users, to manage the access to the lo…
1d24a6f
Gets the new lookback_user parameter
99e993b
Configures the default value for the loopback_users list with the 'gu…
1aebcf7
Handles the loopback_users list in the configuration template
45b94fb
Adds a new test case for a configured list of users
42044fb
Solves a rubocop offense related with a list
84b65d9
Makes not optional the loopback_users parameter
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
This is a strange quirk of how Puppet works, but a param can't be Optional if it has a default. Well, technically, it can, but it can only be overridden with
undef
using hiera, so it's safer to not make it optional, and pass in an empty array (many people's preferred pattern anyway) to set it to an empty list when necessary.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.
Yep, you're right, I'm working with puppet 4 and the automatic hiera bind then I forgot the "old" params pattern; I think an empty list as default value for this parameter is not the best choice to achieve the behaviour that you could expect, so I could make not optional this parameter a fix the default value to the list with the guest user, let's see
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.
Right, I think the right fix is to make the parameter not optional, and if users want to allow the guest user to login remotely as well, they can pass in an empty array. You could explicitly mention that in the param docs if you want to make it more clear.
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.
But the default value should be
['guest']
and then justArray $loopback_users
. I think we're saying the same thing 😃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.
Yes, we're in the same page