Uploaded image for project: 'Help-Desk'
  1. Help-Desk
  2. HELP-6378

FIWARE.Request.Tech.Apps.Store.Wstore_Roles

    Details

    • Type: extRequest
    • Status: Closed
    • Priority: Major
    • Resolution: Done
    • Fix Version/s: 2021
    • Component/s: FIWARE-TECH-HELP
    • Labels:
      None

      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>]

        Activity

        Hide
        fdelavega Francisco de la Vega added a comment -

        Hi,

        The WStore version integrated with the FIWARE Idm by default gives the provider role internally to all its users; nevertheless, switching off this is quite easy:

        In file src/wstore/social_auth_backend.py, replace line 141 (user_roles = ['customer', 'provider']) by:

        user_roles = ['customer']

        Best regards,
        Francisco

        Show
        fdelavega Francisco de la Vega added a comment - Hi, The WStore version integrated with the FIWARE Idm by default gives the provider role internally to all its users; nevertheless, switching off this is quite easy: In file src/wstore/social_auth_backend.py, replace line 141 (user_roles = ['customer', 'provider'] ) by: user_roles = ['customer'] Best regards, Francisco
        Hide
        fw.ext.user FW External User added a comment -

        Comment by azure@blitab.com :
        Hi,

        Doing this change is changing and our role only buyer.
        We tested it yesterday.
        We as administrators want to own all the roles, and all others customers
        only

        Best regards,

        On 4/14/2016 7:18 PM, Help-Desk wrote:
        >
        > >From FIWARE JIRA - Main Help Desk ----
        >
        > -------------------------------------------------------------------------------
        > Comments:
        >
        >
        > Francisco de la Vega - Today 6:17 PM
        > ------------------
        > Hi,
        >
        > The WStore version integrated with the FIWARE Idm by default gives the provider role internally to all its users; nevertheless, switching off this is quite easy:
        >
        > In file src/wstore/social_auth_backend.py, replace line 141 (user_roles = ['customer', 'provider']) by:
        >
        > user_roles = ['customer']
        >
        > Best regards,
        > Francisco
        >
        > ------------------------
        > Issue id: HELP-6378
        > 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>]
        >
        > FIWARE Chapter:
        > FIWARE GEri:
        >
        > Status: Open
        >
        > ---------------------
        > This email was generated by FIWARE JIRA following an email received into the Main Help Desk.
        >

        Show
        fw.ext.user FW External User added a comment - Comment by azure@blitab.com : Hi, Doing this change is changing and our role only buyer. We tested it yesterday. We as administrators want to own all the roles, and all others customers only Best regards, On 4/14/2016 7:18 PM, Help-Desk wrote: > > >From FIWARE JIRA - Main Help Desk ---- > > ------------------------------------------------------------------------------- > Comments: > > > Francisco de la Vega - Today 6:17 PM > ------------------ > Hi, > > The WStore version integrated with the FIWARE Idm by default gives the provider role internally to all its users; nevertheless, switching off this is quite easy: > > In file src/wstore/social_auth_backend.py, replace line 141 (user_roles = ['customer', 'provider'] ) by: > > user_roles = ['customer'] > > Best regards, > Francisco > > ------------------------ > Issue id: HELP-6378 > 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>] > > FIWARE Chapter: > FIWARE GEri: > > Status: Open > > --------------------- > This email was generated by FIWARE JIRA following an email received into the Main Help Desk. >
        Hide
        fw.ext.user FW External User added a comment -

        Comment by azure@blitab.com :

        Hello,

        We did the change which you mentioned in the past but it did not work
        out well. When we remove provider from the array we don't have any
        provider users, even the administrator of WStore is not provider.
        Despite the fact that in Fiware labs we have users who have the
        providers role - when they log in in the website - they lack that role
        and cannot upload offerings/resources.

        Thanks for your help!


        On 4/15/2016 9:13 AM, azure wrote:
        > Hi,
        >
        > Doing this change is changing and our role only buyer.
        > We tested it yesterday.
        > We as administrators want to own all the roles, and all others
        > customers only
        >
        >
        > Best regards,
        >
        >
        >
        >

        Show
        fw.ext.user FW External User added a comment - Comment by azure@blitab.com : Hello, We did the change which you mentioned in the past but it did not work out well. When we remove provider from the array we don't have any provider users, even the administrator of WStore is not provider. Despite the fact that in Fiware labs we have users who have the providers role - when they log in in the website - they lack that role and cannot upload offerings/resources. Thanks for your help! On 4/15/2016 9:13 AM, azure wrote: > Hi, > > Doing this change is changing and our role only buyer. > We tested it yesterday. > We as administrators want to own all the roles, and all others > customers only > > > Best regards, > > > >
        Hide
        fdelavega Francisco de la Vega added a comment -

        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

        Show
        fdelavega Francisco de la Vega added a comment - 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

          People

          • Assignee:
            fdelavega Francisco de la Vega
            Reporter:
            fw.ext.user FW External User
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: