Page MenuHomePhorge

Allow to prefill name and description fields of a new Passphrase
ClosedPublic

Authored by valerio.bozzolan on Feb 10 2023, 19:44.

Details

Summary

Allow to prefill name and description fields of a new Passphrase

Closes T15142

Test Plan

I've visited this URL in my local test installation:

/passphrase/edit/?type=password&username=user&name=super&description=mario

And I was able to see the Name and Description fields prefilled,
just like the username.

I also tried to put the query string on an already-existing element
and it was working as expected, so, without any prefilled value from
the query string.

Diff Detail

Repository
rP Phorge
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

src/applications/passphrase/controller/PassphraseCredentialEditController.php
46

I honestly don't know why here we use (string). Probably we just want to set an empty default to prevent that case? Anyway I've copy-pasted that switching-off my brain. I have no intention to discuss that now, but it's just nice to mention that I'm confused.

52

I honestly don't kno

avivey subscribed.
avivey added inline comments.
src/applications/passphrase/controller/PassphraseCredentialEditController.php
46

I got curios, so I looked it up: https://secure.phabricator.com/D13261#140865 - looks like it's to convert null to '' for the DB schema. I'm not sure if it's still relevant, but there's probably no harm in keeping it.

This revision is now accepted and ready to land.Feb 10 2023, 21:39