{"action":"created","issue":{"url":"https://api.github.com/repos/sparkle-project/Sparkle/issues/868","repository_url":"https://api.github.com/repos/sparkle-project/Sparkle","labels_url":"https://api.github.com/repos/sparkle-project/Sparkle/issues/868/labels{/name}","comments_url":"https://api.github.com/repos/sparkle-project/Sparkle/issues/868/comments","events_url":"https://api.github.com/repos/sparkle-project/Sparkle/issues/868/events","html_url":"https://github.com/sparkle-project/Sparkle/issues/868","id":172285824,"number":868,"title":"Provide a \"prompt\" for authorization","user":{"login":"gnachman","id":427546,"avatar_url":"https://avatars.githubusercontent.com/u/427546?v=3","gravatar_id":"","url":"https://api.github.com/users/gnachman","html_url":"https://github.com/gnachman","followers_url":"https://api.github.com/users/gnachman/followers","following_url":"https://api.github.com/users/gnachman/following{/other_user}","gists_url":"https://api.github.com/users/gnachman/gists{/gist_id}","starred_url":"https://api.github.com/users/gnachman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gnachman/subscriptions","organizations_url":"https://api.github.com/users/gnachman/orgs","repos_url":"https://api.github.com/users/gnachman/repos","events_url":"https://api.github.com/users/gnachman/events{/privacy}","received_events_url":"https://api.github.com/users/gnachman/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-08-20T19:09:20Z","updated_at":"2016-08-20T19:28:28Z","closed_at":null,"body":"When Sparkle needs to get authorization to install over the host bundle, it pops an auth dialog:\r\n\r\n![image](https://cloud.githubusercontent.com/assets/427546/17833304/2aea7558-66ce-11e6-8115-8993fd6ff7ff.png)\r\n\r\nIt would be nice to customize this dialog by providing a custom prompt explaining what's going on. For an example, see cocoasudo here: https://github.com/performantdesign/cocoasudo\r\n\r\nThe change to `-[NSFileManager _copyPathWithForcedAuthentication:toPath:error:]`'s call to `AuthorizationCreate` would be something like:\r\n\r\n````\r\n    AuthorizationEnvironment myAuthorizationEnvironment;\r\n    AuthorizationItem kAuthEnv[1];\r\n    myAuthorizationEnvironment.items = kAuthEnv;\r\n\t\r\n    const char *prompt = \"Sparkle needs permission to upgrade <application name>.\";\r\n    kAuthEnv[0].name = kAuthorizationEnvironmentPrompt;\r\n    kAuthEnv[0].valueLength = strlen(prompt);\r\n    kAuthEnv[0].value = prompt;\r\n    kAuthEnv[0].flags = 0;\r\n    \r\n    myAuthorizationEnvironment.count = 1;\r\n    authStat = AuthorizationCreate(NULL, &myAuthorizationEnvironment, kAuthorizationFlagDefaults, &auth);\r\n````\r\n\r\nThis produces a nicer prompt, like this:\r\n\r\n<img width=\"555\" alt=\"screen shot 2016-08-20 at 12 08 37 pm\" src=\"https://cloud.githubusercontent.com/assets/427546/17833316/db3280e0-66ce-11e6-86d0-01b93cff50a6.png\">\r\n"},"comment":{"url":"https://api.github.com/repos/sparkle-project/Sparkle/issues/comments/241219002","html_url":"https://github.com/sparkle-project/Sparkle/issues/868#issuecomment-241219002","issue_url":"https://api.github.com/repos/sparkle-project/Sparkle/issues/868","id":241219002,"user":{"login":"zorgiepoo","id":857267,"avatar_url":"https://avatars.githubusercontent.com/u/857267?v=3","gravatar_id":"","url":"https://api.github.com/users/zorgiepoo","html_url":"https://github.com/zorgiepoo","followers_url":"https://api.github.com/users/zorgiepoo/followers","following_url":"https://api.github.com/users/zorgiepoo/following{/other_user}","gists_url":"https://api.github.com/users/zorgiepoo/gists{/gist_id}","starred_url":"https://api.github.com/users/zorgiepoo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zorgiepoo/subscriptions","organizations_url":"https://api.github.com/users/zorgiepoo/orgs","repos_url":"https://api.github.com/users/zorgiepoo/repos","events_url":"https://api.github.com/users/zorgiepoo/events{/privacy}","received_events_url":"https://api.github.com/users/zorgiepoo/received_events","type":"User","site_admin":false},"created_at":"2016-08-20T19:28:28Z","updated_at":"2016-08-20T19:28:28Z","body":"Yeah, I handled this for my [fork](https://github.com/zorgiepoo/Sparkle). Somewhere days/months ago in the repo history is code that passes authorization prompt info to the `SUFileManager`, that was more compatible with the deprecated authorization API the official branch uses. There are some edge cases to handle with getting the app icon to show up, and have it work on older systems (eg: 10.8)."}}
{"actor":{"display_login":"zorgiepoo"}}