juju / terms-client

Terms service client
Other
0 stars 7 forks source link

Command to retrieve all uploaded terms #13

Open hatched opened 7 years ago

hatched commented 7 years ago

It would be really helpful if there was a command to list all of the terms and revisions that the user has uploaded.

cmars commented 7 years ago

I looked for this.. and couldn't find such an API endpoint. We probably want to be able to dump all the term revisions that a user's created.

mattyw commented 7 years ago

What do we actually want here, do we want to remember the uploader and query for that. Or do we want to query all terms owned by a certain group?

hatched commented 7 years ago

My original thought was that it would return the terms in which the active users name matched the owner field of the term. At that point maybe a person could add --groups or --group=foo and it would return the same for that group if the user had access?

mattyw commented 7 years ago

@hatched @cmars Whilst looking into the charm terms command I found the following comment: https://github.com/juju/charmstore-client/blob/master/cmd/charm/charmcmd/terms.go#L24

Seems like now is the right time to implement what we actually want. Do we want to track terms based on who uploaded them, or who released them, or what group they are in?

For example. if alice and bob are both in yellow, alice uploads yellow/alice-terms and bob uploaded yellow/bob-terms. Then alice releases yellow/bob-terms and bob releases yellow/alice-terms what should be displayed when alice and bob make queries to see their terms?

hatched commented 7 years ago

They will both see both terms because they have access to them.