{"action":"created","issue":{"url":"https://api.github.com/repos/hotosm/osm-tasking-manager2/issues/602","labels_url":"https://api.github.com/repos/hotosm/osm-tasking-manager2/issues/602/labels{/name}","comments_url":"https://api.github.com/repos/hotosm/osm-tasking-manager2/issues/602/comments","events_url":"https://api.github.com/repos/hotosm/osm-tasking-manager2/issues/602/events","html_url":"https://github.com/hotosm/osm-tasking-manager2/pull/602","id":74793848,"number":602,"title":"Preventing self-validation","user":{"login":"ethan-nelson","id":8998918,"avatar_url":"https://avatars.githubusercontent.com/u/8998918?v=3","gravatar_id":"","url":"https://api.github.com/users/ethan-nelson","html_url":"https://github.com/ethan-nelson","followers_url":"https://api.github.com/users/ethan-nelson/followers","following_url":"https://api.github.com/users/ethan-nelson/following{/other_user}","gists_url":"https://api.github.com/users/ethan-nelson/gists{/gist_id}","starred_url":"https://api.github.com/users/ethan-nelson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ethan-nelson/subscriptions","organizations_url":"https://api.github.com/users/ethan-nelson/orgs","repos_url":"https://api.github.com/users/ethan-nelson/repos","events_url":"https://api.github.com/users/ethan-nelson/events{/privacy}","received_events_url":"https://api.github.com/users/ethan-nelson/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-05-10T00:38:13Z","updated_at":"2015-05-10T18:22:51Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/hotosm/osm-tasking-manager2/pulls/602","html_url":"https://github.com/hotosm/osm-tasking-manager2/pull/602","diff_url":"https://github.com/hotosm/osm-tasking-manager2/pull/602.diff","patch_url":"https://github.com/hotosm/osm-tasking-manager2/pull/602.patch"},"body":"From #589 and multiple mailing list posts, a pull request to prevent self-validation (save project managers or admins).\r\n\r\nFrom the tasks view, the object task is already populated from a database query and sorted by date. Thus, we take the most recent state log and compare it against the current user. If they match, and the user is not an admin or project manager, we disable the submission button and include a friendly message (see picture below). Else, we let them--namely other people or by self if project manager/admin--have the option to validate the tile.\r\n\r\nThis ensures that everyone is still able to self-invalidate a tile.\r\n\r\n![message](https://cloud.githubusercontent.com/assets/8998918/7552586/e5840fea-f682-11e4-80e2-f412ca4ef4ad.JPG)\r\n"},"comment":{"url":"https://api.github.com/repos/hotosm/osm-tasking-manager2/issues/comments/100677671","html_url":"https://github.com/hotosm/osm-tasking-manager2/pull/602#issuecomment-100677671","issue_url":"https://api.github.com/repos/hotosm/osm-tasking-manager2/issues/602","id":100677671,"user":{"login":"ethan-nelson","id":8998918,"avatar_url":"https://avatars.githubusercontent.com/u/8998918?v=3","gravatar_id":"","url":"https://api.github.com/users/ethan-nelson","html_url":"https://github.com/ethan-nelson","followers_url":"https://api.github.com/users/ethan-nelson/followers","following_url":"https://api.github.com/users/ethan-nelson/following{/other_user}","gists_url":"https://api.github.com/users/ethan-nelson/gists{/gist_id}","starred_url":"https://api.github.com/users/ethan-nelson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ethan-nelson/subscriptions","organizations_url":"https://api.github.com/users/ethan-nelson/orgs","repos_url":"https://api.github.com/users/ethan-nelson/repos","events_url":"https://api.github.com/users/ethan-nelson/events{/privacy}","received_events_url":"https://api.github.com/users/ethan-nelson/received_events","type":"User","site_admin":false},"created_at":"2015-05-10T18:22:51Z","updated_at":"2015-05-10T18:22:51Z","body":"And, glad to help :confetti_ball: "}}