Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

__apigee_reserved__developer_details one way? #1096

Open
acobat opened this issue Oct 28, 2024 · 3 comments
Open

__apigee_reserved__developer_details one way? #1096

acobat opened this issue Oct 28, 2024 · 3 comments
Assignees
Labels
bug Something isn't working

Comments

@acobat
Copy link

acobat commented Oct 28, 2024

Description

when using __apigee_reserved__developer_details attribute in appgroup to sync developers, it works one way - e.g. when you add this attr:

  {
  "attributes": [
    {
      "name": "__apigee_reserved__developer_details",
      "value": "[{\"developer\":\"testik@domain.com\",\"roles\":[\"kuku\"]}]"
    }
  ]
}

it will add kuku role to the user

however, when you will replace the role with something else:

  {
 "attributes": [
   {
     "name": "__apigee_reserved__developer_details",
     "value": "[{\"developer\":\"testik@domain.com\",\"roles\":[\"admin\"]}]"
   }
 ]
}

and sync the teams, user will get two roles: kuku, admin, e.g. old role is not removed. So, if user for example once got admin role, it cant be removed with AppGroups API, only via UI, since DB is not changed for removal, only when 'new' roles added to same user, can this be confirmed?

Apigee Info

Apigee X

Steps to Reproduce

Steps to reproduce the behavior:

  1. add new group with attribute with user and existing role, e.g. member
  2. sync
  3. add admin roles
  4. sync
  5. remove admin role
  6. sync

user will stay with admin and all roles that was added before

I just want to have confirmation that this attribute process in 'one-way' - only NEW deltas added, old roles never get removed with API (only with UI in the drupal portal)

Version Info

Drupal 10

@acobat acobat added the bug Something isn't working label Oct 28, 2024
@divya-intelli
Copy link
Collaborator

Hi @acobat , thanks for bringing this to our attention, we will look into it and revert soon.

@kedarkhaire
Copy link
Collaborator

Hi @acobat

Are you trying to achieve this using custom code or by UI ?

Also are you testing this with Apigee Teams Invite members functionality or with Drupal user system ?

Please let us know the versions you are using.

Thanks!

@kedarkhaire kedarkhaire self-assigned this Nov 5, 2024
@acobat
Copy link
Author

acobat commented Nov 7, 2024

Hi,
No custom code, via UI

I first created the appgroups, assigned dev to it with the custom attribute, and then synced teams from Drupal UI from teams menu. No Invites, migrating users.

Versions: Apigee X, and latest Teams from git

Try to create appgroup with Google API (the only way AFAIK). Add member to it with ROLE XXX inside the __apigee_reserved__developer_details attr, e.g.:

{ "attributes": [ { "name": "__apigee_reserved__developer_details", "value": "[{\"developer\":\"testik@domain.com\",\"roles\":[\"kuku\"]}]" } ] }

try to modify the appgroup, but replace the roles (kuku to kuku2) for example, and you will see two roles, while we expect to see the latest one, e.g. kuku2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants