{"action":"closed","issue":{"url":"https://api.github.com/repos/simde-utc/portail/issues/238","repository_url":"https://api.github.com/repos/simde-utc/portail","labels_url":"https://api.github.com/repos/simde-utc/portail/issues/238/labels{/name}","comments_url":"https://api.github.com/repos/simde-utc/portail/issues/238/comments","events_url":"https://api.github.com/repos/simde-utc/portail/issues/238/events","html_url":"https://github.com/simde-utc/portail/issues/238","id":463213855,"node_id":"MDU6SXNzdWU0NjMyMTM4NTU=","number":238,"title":"API pour obtenir les permissions par défaut d'un rôle","user":{"login":"CdRom1","id":18699331,"node_id":"MDQ6VXNlcjE4Njk5MzMx","avatar_url":"https://avatars2.githubusercontent.com/u/18699331?v=4","gravatar_id":"","url":"https://api.github.com/users/CdRom1","html_url":"https://github.com/CdRom1","followers_url":"https://api.github.com/users/CdRom1/followers","following_url":"https://api.github.com/users/CdRom1/following{/other_user}","gists_url":"https://api.github.com/users/CdRom1/gists{/gist_id}","starred_url":"https://api.github.com/users/CdRom1/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CdRom1/subscriptions","organizations_url":"https://api.github.com/users/CdRom1/orgs","repos_url":"https://api.github.com/users/CdRom1/repos","events_url":"https://api.github.com/users/CdRom1/events{/privacy}","received_events_url":"https://api.github.com/users/CdRom1/received_events","type":"User","site_admin":false},"labels":[{"id":827762155,"node_id":"MDU6TGFiZWw4Mjc3NjIxNTU=","url":"https://api.github.com/repos/simde-utc/portail/labels/enhancement","name":"enhancement","color":"a2eeef","default":true}],"state":"closed","locked":false,"assignee":{"login":"NastuzziSamy","id":24639904,"node_id":"MDQ6VXNlcjI0NjM5OTA0","avatar_url":"https://avatars3.githubusercontent.com/u/24639904?v=4","gravatar_id":"","url":"https://api.github.com/users/NastuzziSamy","html_url":"https://github.com/NastuzziSamy","followers_url":"https://api.github.com/users/NastuzziSamy/followers","following_url":"https://api.github.com/users/NastuzziSamy/following{/other_user}","gists_url":"https://api.github.com/users/NastuzziSamy/gists{/gist_id}","starred_url":"https://api.github.com/users/NastuzziSamy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/NastuzziSamy/subscriptions","organizations_url":"https://api.github.com/users/NastuzziSamy/orgs","repos_url":"https://api.github.com/users/NastuzziSamy/repos","events_url":"https://api.github.com/users/NastuzziSamy/events{/privacy}","received_events_url":"https://api.github.com/users/NastuzziSamy/received_events","type":"User","site_admin":false},"assignees":[{"login":"NastuzziSamy","id":24639904,"node_id":"MDQ6VXNlcjI0NjM5OTA0","avatar_url":"https://avatars3.githubusercontent.com/u/24639904?v=4","gravatar_id":"","url":"https://api.github.com/users/NastuzziSamy","html_url":"https://github.com/NastuzziSamy","followers_url":"https://api.github.com/users/NastuzziSamy/followers","following_url":"https://api.github.com/users/NastuzziSamy/following{/other_user}","gists_url":"https://api.github.com/users/NastuzziSamy/gists{/gist_id}","starred_url":"https://api.github.com/users/NastuzziSamy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/NastuzziSamy/subscriptions","organizations_url":"https://api.github.com/users/NastuzziSamy/orgs","repos_url":"https://api.github.com/users/NastuzziSamy/repos","events_url":"https://api.github.com/users/NastuzziSamy/events{/privacy}","received_events_url":"https://api.github.com/users/NastuzziSamy/received_events","type":"User","site_admin":false}],"milestone":null,"comments":2,"created_at":"2019-07-02T12:56:30Z","updated_at":"2019-09-15T22:18:20Z","closed_at":"2019-09-15T22:18:20Z","author_association":"CONTRIBUTOR","body":"Il y a déjà quelques tentatives infructueuses dans [https://github.com/simde-utc/portail/pull/216](https://github.com/simde-utc/portail/pull/216).\r\n\r\nOn a déjà les contrôleurs et les méthodes exposant ça, et il existe déjà des API pour les permissions par défaut d'un utilisateur ou d'un client oauth. Il faut juste créer proprement les routes pour accéder aux mêmes ressources, mais dans le cas d'un rôle. Mais comme je ne connais pas le fonctionnement des permissions, j'ai peur de me lancer et de faire laisser des failles de sécurité. @NastuzziSamy il faudrait que tu me formes, sinon j'aimerais bien que tu le fasses.\r\n\r\nIdéalement, en tant qu'admin, j'aimerais bien pouvoir demander le scope  `get-role-permissions` et avoir une route me donnant les permissions d'un rôle. Un cas d'utilisation: pour donner à tous les secrétaires le droit de réserver des salles, il faudrait que j'aie `manage-role-permissions` et que je patch /roles/uuid-du-secretaire/permissions avec `booking`"}}
{"actor":{"display_login":"CdRom1"}}