Identify builtin files and give them open policies

Summary:
Fixes T7379. Currently, builtin files generate with a "users" view policy even if an install is public.

Because these files TTL after 7 days, there's no migration here. Installs won't see the fix actually happen for up to 7 days after updating, though.

Test Plan:
  - Deleted a builtin.
  - Loaded projects page to regenerate it.
  - Saw new builtin had most open policy and was marked as a builtin.

Reviewers: btrahan

Reviewed By: btrahan

Subscribers: epriestley

Maniphest Tasks: T7379

Differential Revision: https://secure.phabricator.com/D11917
This commit is contained in:
epriestley
2015-03-01 12:12:38 -08:00
parent 963025d374
commit d1eda610fa
2 changed files with 34 additions and 0 deletions

View File

@@ -222,6 +222,15 @@ final class PhabricatorFileInfoController extends PhabricatorFileController {
$finfo->addProperty(pht('Viewable Image'), $image_string);
$finfo->addProperty(pht('Cacheable'), $cache_string);
$builtin = $file->getBuiltinName();
if ($builtin === null) {
$builtin_string = pht('No');
} else {
$builtin_string = $builtin;
}
$finfo->addProperty(pht('Builtin'), $builtin_string);
$storage_properties = new PHUIPropertyListView();
$box->addPropertyList($storage_properties, pht('Storage'));