{"action":"created","issue":{"url":"https://api.github.com/repos/RexOps/Rex/issues/802","labels_url":"https://api.github.com/repos/RexOps/Rex/issues/802/labels{/name}","comments_url":"https://api.github.com/repos/RexOps/Rex/issues/802/comments","events_url":"https://api.github.com/repos/RexOps/Rex/issues/802/events","html_url":"https://github.com/RexOps/Rex/pull/802","id":109641125,"number":802,"title":"Fix managing a user's own crontab via cron_entry","user":{"login":"ferki","id":3117609,"avatar_url":"https://avatars.githubusercontent.com/u/3117609?v=3","gravatar_id":"","url":"https://api.github.com/users/ferki","html_url":"https://github.com/ferki","followers_url":"https://api.github.com/users/ferki/followers","following_url":"https://api.github.com/users/ferki/following{/other_user}","gists_url":"https://api.github.com/users/ferki/gists{/gist_id}","starred_url":"https://api.github.com/users/ferki/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ferki/subscriptions","organizations_url":"https://api.github.com/users/ferki/orgs","repos_url":"https://api.github.com/users/ferki/repos","events_url":"https://api.github.com/users/ferki/events{/privacy}","received_events_url":"https://api.github.com/users/ferki/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-10-03T19:35:42Z","updated_at":"2015-10-04T08:37:28Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/RexOps/Rex/pulls/802","html_url":"https://github.com/RexOps/Rex/pull/802","diff_url":"https://github.com/RexOps/Rex/pull/802.diff","patch_url":"https://github.com/RexOps/Rex/pull/802.patch"},"body":"`cron_entry` fails without passing a user to it (correctly), however this enforces calling `crontab` CLI command on the remotes with the `-u` option, which in turn requires superuser privileges.\n\nThis patch resolves that situation, by checking if the effective remote username is the same as the username for which the crontab operation is requested. If yes, it means the user manages his/her own crontab, so Rex avoids using the `-u` CLI option."},"comment":{"url":"https://api.github.com/repos/RexOps/Rex/issues/comments/145328081","html_url":"https://github.com/RexOps/Rex/pull/802#issuecomment-145328081","issue_url":"https://api.github.com/repos/RexOps/Rex/issues/802","id":145328081,"user":{"login":"ferki","id":3117609,"avatar_url":"https://avatars.githubusercontent.com/u/3117609?v=3","gravatar_id":"","url":"https://api.github.com/users/ferki","html_url":"https://github.com/ferki","followers_url":"https://api.github.com/users/ferki/followers","following_url":"https://api.github.com/users/ferki/following{/other_user}","gists_url":"https://api.github.com/users/ferki/gists{/gist_id}","starred_url":"https://api.github.com/users/ferki/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ferki/subscriptions","organizations_url":"https://api.github.com/users/ferki/orgs","repos_url":"https://api.github.com/users/ferki/repos","events_url":"https://api.github.com/users/ferki/events{/privacy}","received_events_url":"https://api.github.com/users/ferki/received_events","type":"User","site_admin":false},"created_at":"2015-10-04T08:37:28Z","updated_at":"2015-10-04T08:37:28Z","body":"Ok, that's not a rex issue, but how `crontab` command with `vixie-cron` behaves (at least on gentoo)."}}