Glance-api-v2-image-sharing
In this discussion, we'll assume 2 users:
- "A" who wants to share images
- "B" who is a user other than "A"
Background
Currently, the image list for user B contains all of the following:
- all public images
- all images owned by B
- all images that have B as an image member (currently v1 only)
Currently, image owner A can add B as a member of A's image I1
Problem
The problem with using image members as a basis of full-blown image sharing is that B may not want to see I1 in the image list (SPAM).
Proposal
Add another image property similar to image members called something like "accepted-tenants". The property would be a list of tenantIds. The only way this property can be modified is: the tenantId of the person making the call matches the tenantId being added/removed from the "accepted-tenants" list.
So now we can have *two* image-list calls:
- the one described above (this would be like looking into your email SPAM folder)
- a call that changes the third clause as follows: all images that both (a) have B as an image member *and* (b) have B as an element of the "accepted-tenant" list