Created question in FIWARE Q/A platform on 05-11-2015 at 13:11
Please, ANSWER this question AT https://stackoverflow.com/questions/33545229/fiware-idm-keyrock-how-to-check-if-user-has-some-permissionpermission-fiware
Question:
Fiware IDM-Keyrock: How to check if user has some permission(permission_fiware) using keyrock API
Description:
I created some permissions(permission_fiware table) in Horizon regarding urls that can or cant be seen.I created permission(name:Upload images, with resource: "/image_upload") and role(role_fiware) admin that has this permission.
Now i want to check whether some user that is logged in to my application can view that page on url "/image_upload" that i defined in horizons permission.So my guess is i should first check what roles user has, and after that whether those roles that user is assigned have required permission.
So, my question is next:
How can i list what permission one specific user has.
In Keyrocks API:
http://docs.keyrock.apiary.io/#reference/keystone-extensions/role-user-relationships/list-users-role-assignments
i found how i can list all permissions for a specific role
http://keyrock/OS-ROLES/roles/role_id/permissions
but how can i get information about what roles(role_fiware) are assigned to a user?
2017-05-22 21:12|UPDATED status: transition Finish| # answers= 1, accepted answer= True