Skip to content

View secret details

https://redmine.teklia.com/issues/10664

Requires enterprise#60, #1565 (closed)

The secret store should now include a secrets: Record<string, Secret> state, and a get(name: string) action to call RetrieveSecret.

In the secrets list, clicking on the name of a secret should open a new /secret/:name+ view. This new view is declared in the router as requiring a verified email and the enterprise feature flag.

The + will tell Vue Router to use a repeatable param, which will return a string[]. You can recover the name with name.join('/'). This means we support pretty URLs like /secret/path/to/thing.txt just like in the API.

A button allows to return to the secrets page, just like in the budget details view. The title shows the secret name, with an ItemId as a subtitle for the secret's UUID. The page has two sections, Content and Members.

The content section only contains one button, Reveal. It is disabled if the user does not have contributor rights, with a title explaining why. This button will allow users to manage a secret without having to leak its contents if they don't need to see them.

Clicking the Reveal button shows a <pre> block with the contents of the secret below the buttons. It then becomes a Hide button, and clicking that hides the content again.

Just like the budget details view, the members section shows the membership management component to allow updating access rights on the secret.

When the view is still loading, only the secret name and back button are visible, and a loading spinner is shown.