Page MenuHomePhabricator

Generalize Legalpad validation logic for "Require Signature"
ClosedPublic

Authored by epriestley on Mar 22 2019, 4:27 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sun, Jun 15, 8:41 PM
Unknown Object (File)
Sat, Jun 14, 2:51 AM
Unknown Object (File)
Sat, Jun 14, 2:49 AM
Unknown Object (File)
Fri, Jun 13, 11:59 PM
Unknown Object (File)
May 9 2025, 12:43 AM
Unknown Object (File)
May 9 2025, 12:43 AM
Unknown Object (File)
May 6 2025, 10:19 PM
Unknown Object (File)
Apr 30 2025, 10:27 AM
Subscribers
None

Details

Summary

See downstream https://phabricator.wikimedia.org/T208254.

I can't actually reproduce any issue here (we only show this field when creating a document, and only if the viewer is an administrator), so maybe this relied on some changes or was originally reported against older code.

Regardless, the validation isn't quite right: it requires administrator privileges to apply this transaction at all, but should only require administrator privileges to change the value.

Test Plan

Edited Legalpad documents as an administrator and non-administrator before and after the change, with and without signatures being required.

Couldn't reproduce the original issue, but this version is generally more correct/robust.

Diff Detail

Repository
rP Phabricator
Lint
Lint Not Applicable
Unit
Tests Not Applicable