FusionAuth / fusionauth-issues

FusionAuth issue submission project
https://fusionauth.io
90 stars 12 forks source link

User consent giver doesn't show up in the admin UI #718

Closed mooreds closed 2 months ago

mooreds commented 4 years ago

User consent giver doesn't show up in the admin UI

Description

When I grant a user consent, I provide both the id of the user receiving consent and the user giving it, per https://fusionauth.io/docs/v1/tech/apis/consent#grant-a-user-consent

When I do so, both values are recorded in the user consent object and the user receiving consent has a new consent in the admin screen (on the user details tab, under consents) but the user giving the consent is absent.

Steps to reproduce

Steps to reproduce the behavior:

  1. Create two users (I added ages but don't know if that is needed)
  2. Add them to a family
  3. Create a consent.
  4. Create an admin api key.
  5. Run this curl script to give consent:
API_KEY=...
CONSENT_ID=...

curl -XPOST -H 'Content-type: application/json' -H "Authorization: $API_KEY" 'http://localhost:9011/api/user/consent' -d '{"userConsent": {"giverUserId" : "PUT_GIVER_USER_ID", "userId": "PUT_RECIPIENT_USER_ID", "consentId": "'$CONSENT_ID'"  }}'

Now look for the consent.

  1. Log into the admin screen, go to the receiver's consent tab.
  2. The consent shows up, but the 'given by' column is -

However, if you run this curl script:

API_KEY=...

curl -XGET  -H "Authorization: $API_KEY" 'http://localhost:9011/api/user/consent/?userId=PUT_RECIPIENT_USER_ID'

You'll see the giver id is stored.

Expected behavior

The admin UI should show the consent giver user and make it linked to that user's details page.

Screenshots

Screen Shot 2020-06-30 at 5 23 39 PM Screen Shot 2020-06-30 at 5 24 40 PM

Platform

FusionAuth 1.17.0

Additional context

No errors in the javascript console. No errors in the fusionauth server log.

LucasPMorris commented 2 months ago

Similar / Related: #722 #1822

andrewpai commented 2 months ago

Closing, as this was fixed in 1.49.0.