{"action":"created","issue":{"url":"https://api.github.com/repos/syncthing/syncthing/issues/1181","labels_url":"https://api.github.com/repos/syncthing/syncthing/issues/1181/labels{/name}","comments_url":"https://api.github.com/repos/syncthing/syncthing/issues/1181/comments","events_url":"https://api.github.com/repos/syncthing/syncthing/issues/1181/events","html_url":"https://github.com/syncthing/syncthing/pull/1181","id":53460800,"number":1181,"title":"Return HTTP/500 from /rest/upgrade if STNOUPGRADE is defined","user":{"login":"kozec","id":1282500,"avatar_url":"https://avatars.githubusercontent.com/u/1282500?v=3","gravatar_id":"","url":"https://api.github.com/users/kozec","html_url":"https://github.com/kozec","followers_url":"https://api.github.com/users/kozec/followers","following_url":"https://api.github.com/users/kozec/following{/other_user}","gists_url":"https://api.github.com/users/kozec/gists{/gist_id}","starred_url":"https://api.github.com/users/kozec/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kozec/subscriptions","organizations_url":"https://api.github.com/users/kozec/orgs","repos_url":"https://api.github.com/users/kozec/repos","events_url":"https://api.github.com/users/kozec/events{/privacy}","received_events_url":"https://api.github.com/users/kozec/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":6,"created_at":"2015-01-05T23:18:33Z","updated_at":"2015-01-06T21:47:47Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/syncthing/syncthing/pulls/1181","html_url":"https://github.com/syncthing/syncthing/pull/1181","diff_url":"https://github.com/syncthing/syncthing/pull/1181.diff","patch_url":"https://github.com/syncthing/syncthing/pull/1181.patch"},"body":"I had bug report (syncthing/syncthing-gtk#56) recently, from guy that managed to break his Syncthing managed by Syncthing-GTK installation, when he manually upgraded to unsupported Syncthing daemon version. He did it, because he saw that green, friendly-looking button `Upgrade To vXYZ` in WebUI.\r\n\r\nThat's why that button has to die :)\r\n\r\nOk, now, in all seriousness, this PR disables `Upgrade To...` button in WebUI, but **only** if STNOUPGRADE is specified. As you can see bellow, it does it by adding `enabled` field to `/rest/upgrade` response and adding this field to condition under which button is shown. I believe that it shouldn't break anything else.\r\nAnd you can protect users from themselves by merging this ;-)"},"comment":{"url":"https://api.github.com/repos/syncthing/syncthing/issues/comments/68939911","html_url":"https://github.com/syncthing/syncthing/pull/1181#issuecomment-68939911","issue_url":"https://api.github.com/repos/syncthing/syncthing/issues/1181","id":68939911,"user":{"login":"kozec","id":1282500,"avatar_url":"https://avatars.githubusercontent.com/u/1282500?v=3","gravatar_id":"","url":"https://api.github.com/users/kozec","html_url":"https://github.com/kozec","followers_url":"https://api.github.com/users/kozec/followers","following_url":"https://api.github.com/users/kozec/following{/other_user}","gists_url":"https://api.github.com/users/kozec/gists{/gist_id}","starred_url":"https://api.github.com/users/kozec/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kozec/subscriptions","organizations_url":"https://api.github.com/users/kozec/orgs","repos_url":"https://api.github.com/users/kozec/repos","events_url":"https://api.github.com/users/kozec/events{/privacy}","received_events_url":"https://api.github.com/users/kozec/received_events","type":"User","site_admin":false},"created_at":"2015-01-06T21:47:47Z","updated_at":"2015-01-06T21:47:47Z","body":"Ok, I hope that I didn't broke github with this... PR modified and additional space removed :)"}}