add proxy and sponsor links to the user schema

Description

In order to support work in https://folio-org.atlassian.net/browse/UIU-104#icft=UIU-104.

As discussed, to simplify managing consistency of proxy<->sponsor links the initial implementation should include a unidirectional link from the proxy user to the sponsor user:

{ ... "proxyFor": ["123-456-789", "234-567-890"] ... }

This will allows us to optimize the "check out as proxy" operation and allow to directly look-up sponsor for a given user on the user details pane. To retrieve all proxy users for a given sponsor user we will use search, e.g given sponsor user id "345-678-910":

/users/?query=proxyFor="345-678-910"

Adding a proxy user to a given sponsor user will mean adding sponsor user id to the proxyFor field in the proxy user record.

Environment

None

Potential Workaround

None

blocks

Checklist

hide

TestRail: Results

Activity

Show:

Michal Kuklis August 28, 2017 at 1:17 PM
Edited

This makes sense. Thank you both! I missed the fact that the proxyFor field is returned with the selected user.

Jakub Skoczen August 28, 2017 at 8:58 AM

Guys, as described above we will be maintaining only a unidirectional link: so no sponsorsFor field.

So given a user 123-456, to find all proxies for the user (in other words: find all users the user is acting as a sponsor for) you need to search:

proxyFor = "123-456"

and to find all sponsors this user is acting as a proxy for, you don't need to search as you have that information in the proxyFor field.

If the name proxyFor is confusing, we can change this and simply call the field sponsors.

Kurt Nordstrom August 26, 2017 at 11:32 AM

Yes, the aforementioned query should effectively match sub-elements in the array.

Michal Kuklis August 25, 2017 at 6:37 PM
Edited

Hi could you tell what is the correct way to query for sponsors? Would something like this work:

/users/?query=sponsorsFor="345-678-910"
Done

Details

Assignee

Reporter

Priority

Fix versions

TestRail: Cases

Open TestRail: Cases

TestRail: Runs

Open TestRail: Runs
Created August 10, 2017 at 12:18 PM
Updated September 5, 2017 at 11:55 AM
Resolved August 23, 2017 at 8:19 PM
TestRail: Cases
TestRail: Runs

Flag notifications