Details
-
Type: extRequest
-
Status: Closed
-
Priority: Major
-
Resolution: Done
-
Fix Version/s: 2021
-
Component/s: FIWARE-TECH-HELP
-
Labels:None
-
Sender Email:
-
External Participants:
-
HD-Chapter:Apps
-
HD-Enabler:WStore
Description
Hello Aitor,
We are struggling with managing user roles in WStore (we are using the
FIWARE IdM - OAuth). We can manage roles in the FIWARE Lab without
problems. By default, all users that log in with our application have a
provider role - we do not want that. We want users to be only
customers/purchasers. The providers should be only the people that we
have allowed in our application.
Can you pinpoint us the proper way to make this change?
Best wishes!
[Created via e-mail received from: azure <azure@blitab.com>]
Hi,
You are right, this line is hardcoding the roles to give them all to all users.
To use the idm ones, try the following:
Remove
user_roles = ['customer', 'provider']
In line 145, replace: 'roles': user_roles
by 'roles': user_org.roles
Best regards,
Francisco