serokell / coffer

Multi-backend password store with multiple frontends
4 stars 2 forks source link

Add support for specifying "default fields" #2

Open dcastro opened 2 years ago

dcastro commented 2 years ago

In #1, we'll implement a way of retrieving a single field from a single entry.

It would be convenient to not be forced to specify which field we want to retrieve all the time. In most cases, most entries will have a "default field" that we want to copy (e.g. password or token).

We should let the user specify which field they want to be the default field (in coffer create, via CLI options, via the "editor mode", or via the web API).

Questions to be addressed:

MagicRB commented 2 years ago

I think we should have a metadata editing command/UI/editor mode, it would allow changing the dateModifeds, private, tags and stuff.

sancho20021 commented 2 years ago

We have master-field in entries, that seems to be related with default fields, but I don't understand how it currently works. When I view an entry without specifying the field coffer just shows me the entire entry. Moreover, I assume that the master-field is always set to Nothing.

What is the expected behavior of master-fields?

dcastro commented 2 years ago

We have master-field in entries, that seems to be related with default fields

That's correct.

Moreover, I assume that the master-field is always set to Nothing.

Yup, for the time being.

When I view an entry without specifying the field coffer just shows me the entire entry

That's a good point. I agree with the current behaviour, coffer /entry should display the whole entry. I'm not sure what the syntax for displaying the default field should be though.

@MagicRB do you have an opinion on this?