{"action":"created","issue":{"url":"https://api.github.com/repos/policycompass/policycompass-frontend/issues/220","labels_url":"https://api.github.com/repos/policycompass/policycompass-frontend/issues/220/labels{/name}","comments_url":"https://api.github.com/repos/policycompass/policycompass-frontend/issues/220/comments","events_url":"https://api.github.com/repos/policycompass/policycompass-frontend/issues/220/events","html_url":"https://github.com/policycompass/policycompass-frontend/pull/220","id":113845508,"number":220,"title":"2015 10 mn edit button","user":{"login":"MagdaN","id":2905743,"avatar_url":"https://avatars.githubusercontent.com/u/2905743?v=3","gravatar_id":"","url":"https://api.github.com/users/MagdaN","html_url":"https://github.com/MagdaN","followers_url":"https://api.github.com/users/MagdaN/followers","following_url":"https://api.github.com/users/MagdaN/following{/other_user}","gists_url":"https://api.github.com/users/MagdaN/gists{/gist_id}","starred_url":"https://api.github.com/users/MagdaN/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MagdaN/subscriptions","organizations_url":"https://api.github.com/users/MagdaN/orgs","repos_url":"https://api.github.com/users/MagdaN/repos","events_url":"https://api.github.com/users/MagdaN/events{/privacy}","received_events_url":"https://api.github.com/users/MagdaN/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":7,"created_at":"2015-10-28T15:18:50Z","updated_at":"2015-10-31T02:21:38Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/policycompass/policycompass-frontend/pulls/220","html_url":"https://github.com/policycompass/policycompass-frontend/pull/220","diff_url":"https://github.com/policycompass/policycompass-frontend/pull/220.diff","patch_url":"https://github.com/policycompass/policycompass-frontend/pull/220.patch"},"body":"OK, I added a simple directive that will show an edit and an delete button when the user is admin or creator of a resource. I assume that the buttons are added on the detail page of a resource and that the creator is known (means in scope) of that page. You can add the buttons like that:\r\n\r\n```\r\n<edit-buttons \r\ndata-userpath=\"{{ data.creator_path }}\" \r\ndata-editurl=\"#!/metrics/{{data.id}}/edit\"                \r\ndata-deletefunction=\"delete\">\r\n</edit-buttons>\r\n```\r\n\r\n*  data-userpath is the creator of the resource (should be a path),\r\n*  data-editurl is the url where the edit button should link to\r\n*  deletefunction is the function from the surrounding scope that is called when clicking the 'delete' button "},"comment":{"url":"https://api.github.com/repos/policycompass/policycompass-frontend/issues/comments/152687220","html_url":"https://github.com/policycompass/policycompass-frontend/pull/220#issuecomment-152687220","issue_url":"https://api.github.com/repos/policycompass/policycompass-frontend/issues/220","id":152687220,"user":{"login":"cbotsikas","id":1640100,"avatar_url":"https://avatars.githubusercontent.com/u/1640100?v=3","gravatar_id":"","url":"https://api.github.com/users/cbotsikas","html_url":"https://github.com/cbotsikas","followers_url":"https://api.github.com/users/cbotsikas/followers","following_url":"https://api.github.com/users/cbotsikas/following{/other_user}","gists_url":"https://api.github.com/users/cbotsikas/gists{/gist_id}","starred_url":"https://api.github.com/users/cbotsikas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cbotsikas/subscriptions","organizations_url":"https://api.github.com/users/cbotsikas/orgs","repos_url":"https://api.github.com/users/cbotsikas/repos","events_url":"https://api.github.com/users/cbotsikas/events{/privacy}","received_events_url":"https://api.github.com/users/cbotsikas/received_events","type":"User","site_admin":false},"created_at":"2015-10-31T02:21:38Z","updated_at":"2015-10-31T02:21:38Z","body":"@FabiApfelkern I'm confused with @MagdaN statement \"adhocracy api has changed - instead of the userpath the full userurl is sent\". My question is, what's expected as userpath in the django backend when self.request.user.resource_path is used? Is is a userpath in the form of \"/principals/users/XXXXXX\" or a full url?"}}