Hi Dawid,
I didn't know it's not possible to re-open ticket, I will leave this one 'in-progress' :).
Please take a look to script I've written to you in previous ticket. Actually mapping is inside "if" statement:
hasRole('Manager') or hasRole('Viewer'). It is mapping you need, isn't it?
It is mapping for "view" scope. So for "edit" scope you would probably (not sure about your requirements) need another script which would allow to edit only Manager role:
hasRole('Manager')
We don't have built-in hasRole() function, so you would probably need to implement it on your own (or ask official Gluu support).
Thanks,
Yuriy