{"action":"opened","issue":{"url":"https://api.github.com/repos/WICG/BackgroundSync/issues/122","repository_url":"https://api.github.com/repos/WICG/BackgroundSync","labels_url":"https://api.github.com/repos/WICG/BackgroundSync/issues/122/labels{/name}","comments_url":"https://api.github.com/repos/WICG/BackgroundSync/issues/122/comments","events_url":"https://api.github.com/repos/WICG/BackgroundSync/issues/122/events","html_url":"https://github.com/WICG/BackgroundSync/issues/122","id":131652366,"number":122,"title":"sync.register when permission is denied","user":{"login":"jkarlin","id":6920902,"avatar_url":"https://avatars.githubusercontent.com/u/6920902?v=3","gravatar_id":"","url":"https://api.github.com/users/jkarlin","html_url":"https://github.com/jkarlin","followers_url":"https://api.github.com/users/jkarlin/followers","following_url":"https://api.github.com/users/jkarlin/following{/other_user}","gists_url":"https://api.github.com/users/jkarlin/gists{/gist_id}","starred_url":"https://api.github.com/users/jkarlin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jkarlin/subscriptions","organizations_url":"https://api.github.com/users/jkarlin/orgs","repos_url":"https://api.github.com/users/jkarlin/repos","events_url":"https://api.github.com/users/jkarlin/events{/privacy}","received_events_url":"https://api.github.com/users/jkarlin/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2016-02-05T14:00:03Z","updated_at":"2016-02-05T14:00:03Z","closed_at":null,"body":"If Background Sync were to be added to the permissions API, what should `sync.register`'s behavior be when sync permission is denied?\r\n\r\n**Reject the registration**\r\nThis is the simplest approach. If permission is denied then simply reject the registration.\r\n- Simple and expected by developers\r\n- Developer needs an alternate upload handler in case of rejection. \r\n\r\n**Resolve the registration but don't run in the background**\r\nBackground sync will work as usual so long as it's not [in the background](https://wicg.github.io/BackgroundSync/spec/#in-the-background). The `register` call should probably return a boolean on whether it will run in the background or not. \r\n\r\n- Unexpected behavior for developers given that it's called \"background sync\". \r\n- Single method of uploading data with retries."}}