Last active
October 19, 2017 13:01
-
-
Save wagner/f6370cfaa3c344d91f23e295b78886b5 to your computer and use it in GitHub Desktop.
Edição de roles e permissões
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1. Editar role | |
GET /role/123 | |
GET /permissions | |
GET /role/123/given_permissions | |
2. Apagar uma permissão | |
DELETE /role/123/given_permissions/100001 | |
3. Adicionar permissão | |
POST /role/123/given_permissions | |
{ | |
permission_id: 4 | |
} | |
-> | |
{ | |
"given_permissions": [ | |
{ | |
id: 10001, | |
permission: { | |
id: 4, | |
action: 'update', | |
subject: 'customer', | |
} | |
] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Conforme falei. Join table não tem ID, então é como se não existisse esse recurso.
Minha sugestão: