{"action":"created","issue":{"url":"https://api.github.com/repos/camptocamp/puppet-googleauthenticator/issues/5","labels_url":"https://api.github.com/repos/camptocamp/puppet-googleauthenticator/issues/5/labels{/name}","comments_url":"https://api.github.com/repos/camptocamp/puppet-googleauthenticator/issues/5/comments","events_url":"https://api.github.com/repos/camptocamp/puppet-googleauthenticator/issues/5/events","html_url":"https://github.com/camptocamp/puppet-googleauthenticator/pull/5","id":63285940,"number":5,"title":"Adding a parameter to the user defined type to allow (but not require)","user":{"login":"woodsbw","id":242360,"avatar_url":"https://avatars.githubusercontent.com/u/242360?v=3","gravatar_id":"","url":"https://api.github.com/users/woodsbw","html_url":"https://github.com/woodsbw","followers_url":"https://api.github.com/users/woodsbw/followers","following_url":"https://api.github.com/users/woodsbw/following{/other_user}","gists_url":"https://api.github.com/users/woodsbw/gists{/gist_id}","starred_url":"https://api.github.com/users/woodsbw/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/woodsbw/subscriptions","organizations_url":"https://api.github.com/users/woodsbw/orgs","repos_url":"https://api.github.com/users/woodsbw/repos","events_url":"https://api.github.com/users/woodsbw/events{/privacy}","received_events_url":"https://api.github.com/users/woodsbw/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-03-20T19:16:43Z","updated_at":"2015-03-24T14:24:20Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/camptocamp/puppet-googleauthenticator/pulls/5","html_url":"https://github.com/camptocamp/puppet-googleauthenticator/pull/5","diff_url":"https://github.com/camptocamp/puppet-googleauthenticator/pull/5.diff","patch_url":"https://github.com/camptocamp/puppet-googleauthenticator/pull/5.patch"},"body":"the group of the written files to be explicitly set, as a group with the\r\nsame name of the user doesn't always exist, especially if you are using\r\nan external identity store. If the $group parameter is not set, the type\r\nwill function as it did before."},"comment":{"url":"https://api.github.com/repos/camptocamp/puppet-googleauthenticator/issues/comments/85519790","html_url":"https://github.com/camptocamp/puppet-googleauthenticator/pull/5#issuecomment-85519790","issue_url":"https://api.github.com/repos/camptocamp/puppet-googleauthenticator/issues/5","id":85519790,"user":{"login":"woodsbw","id":242360,"avatar_url":"https://avatars.githubusercontent.com/u/242360?v=3","gravatar_id":"","url":"https://api.github.com/users/woodsbw","html_url":"https://github.com/woodsbw","followers_url":"https://api.github.com/users/woodsbw/followers","following_url":"https://api.github.com/users/woodsbw/following{/other_user}","gists_url":"https://api.github.com/users/woodsbw/gists{/gist_id}","starred_url":"https://api.github.com/users/woodsbw/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/woodsbw/subscriptions","organizations_url":"https://api.github.com/users/woodsbw/orgs","repos_url":"https://api.github.com/users/woodsbw/repos","events_url":"https://api.github.com/users/woodsbw/events{/privacy}","received_events_url":"https://api.github.com/users/woodsbw/received_events","type":"User","site_admin":false},"created_at":"2015-03-24T14:24:20Z","updated_at":"2015-03-24T14:24:20Z","body":"But, wouldn't that have a different effect from what would be expected if someone created the resources and specified a $user as well as a resource name? I did it this way because I would expect these scenarios could happen, and would need to have to following results:\r\n\r\n1) $name is set, $user is NOT set, $group is NOT set...result is that the group needs to be $name\r\n2) $name is set, $user is set, $group is NOT set...result is that the group needs to be $user\r\n3) $name is set, $user is NOT set, $group is set....result is that group needs to be $group\r\n4) $name is set, $user is set, $group is set....result is that the group needs to be $group\r\n\r\nIf $group just defaulted to $name, then it would mean that, when $user is set, it would be ignored in setting the group....and would result is different behavior than what the code gave before (when group was just set to $real_user.)"}}