{"action":"created","issue":{"url":"https://api.github.com/repos/caskdata/cdap/issues/5380","repository_url":"https://api.github.com/repos/caskdata/cdap","labels_url":"https://api.github.com/repos/caskdata/cdap/issues/5380/labels{/name}","comments_url":"https://api.github.com/repos/caskdata/cdap/issues/5380/comments","events_url":"https://api.github.com/repos/caskdata/cdap/issues/5380/events","html_url":"https://github.com/caskdata/cdap/pull/5380","id":143360445,"number":5380,"title":"(CDAP-5382) Added authorization for application lifecycle. When autho…","user":{"login":"bdmogal","id":3895099,"avatar_url":"https://avatars.githubusercontent.com/u/3895099?v=3","gravatar_id":"","url":"https://api.github.com/users/bdmogal","html_url":"https://github.com/bdmogal","followers_url":"https://api.github.com/users/bdmogal/followers","following_url":"https://api.github.com/users/bdmogal/following{/other_user}","gists_url":"https://api.github.com/users/bdmogal/gists{/gist_id}","starred_url":"https://api.github.com/users/bdmogal/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bdmogal/subscriptions","organizations_url":"https://api.github.com/users/bdmogal/orgs","repos_url":"https://api.github.com/users/bdmogal/repos","events_url":"https://api.github.com/users/bdmogal/events{/privacy}","received_events_url":"https://api.github.com/users/bdmogal/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/caskdata/cdap/labels/3.4","name":"3.4","color":"0052cc"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2016-03-24T21:11:11Z","updated_at":"2016-03-25T18:31:17Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/caskdata/cdap/pulls/5380","html_url":"https://github.com/caskdata/cdap/pull/5380","diff_url":"https://github.com/caskdata/cdap/pull/5380.diff","patch_url":"https://github.com/caskdata/cdap/pull/5380.patch"},"body":"…rization is enabled,\r\n\r\n- To deploy an app, a user needs WRITE permissions on the namespace in which the app is being deployed\r\n- If the user is authorized, and if app deployment succeeds, the user gets ALL privileges on that app\r\n- To update an app (redeploy the jar), the user needs ADMIN privileges on the app\r\n- To delete an app, the user needs ADMIN privileges on the app\r\n- The first step in delete is to revoke all privileges on the app, so even if the delete operation fails, we're taking the safe route of revoking privileges\r\n\r\nJira: [CDAP-5382](https://issues.cask.co/browse/CDAP-5382)\r\nBuild: http://builds.cask.co/browse/CDAP-DUT3783"},"comment":{"url":"https://api.github.com/repos/caskdata/cdap/issues/comments/201407459","html_url":"https://github.com/caskdata/cdap/pull/5380#issuecomment-201407459","issue_url":"https://api.github.com/repos/caskdata/cdap/issues/5380","id":201407459,"user":{"login":"rohitsinha54","id":1472867,"avatar_url":"https://avatars.githubusercontent.com/u/1472867?v=3","gravatar_id":"","url":"https://api.github.com/users/rohitsinha54","html_url":"https://github.com/rohitsinha54","followers_url":"https://api.github.com/users/rohitsinha54/followers","following_url":"https://api.github.com/users/rohitsinha54/following{/other_user}","gists_url":"https://api.github.com/users/rohitsinha54/gists{/gist_id}","starred_url":"https://api.github.com/users/rohitsinha54/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rohitsinha54/subscriptions","organizations_url":"https://api.github.com/users/rohitsinha54/orgs","repos_url":"https://api.github.com/users/rohitsinha54/repos","events_url":"https://api.github.com/users/rohitsinha54/events{/privacy}","received_events_url":"https://api.github.com/users/rohitsinha54/received_events","type":"User","site_admin":false},"created_at":"2016-03-25T18:31:17Z","updated_at":"2016-03-25T18:31:17Z","body":"I agree with the choice made but ideally they should be atomic operations. Not sure if it's possible here but might be a good idea to have a safeguard which only deletes if the privileges were revoked successfully. "}}