How to find the PHID for the "policy.view" URL parameter when creating a task?


#1

Trying to use URL parameters to prefill the task view policy in the task creation form, /maniphest/task/edit/parameters/ says that the “policy.view” parameter expects a PHID.
If I wanted to set the “View Policy” dropdown to “Administrators” on the task creation form, how can I find out the PHID of “Administrators” object? Entering “[“Administrators”]” on /conduit/method/phid.lookup/ won’t work either, obviously…
As a link: /maniphest/task/edit/form/1/?projects=FooBar&policy.view=???

Thanks in advance for any hints!


#2

Try ?policy.view=admin. This isn’t necessarily officially supported, but is unlikely to break anytime soon.

The magic internal values for the builtin policies are defined here:

https://secure.phabricator.com/source/phabricator/browse/master/src/applications/policy/constants/PhabricatorPolicies.php;f43d08c2bbe6ed6d7f9b35a09f1d9e0564c13f9b$5-8