Changeset View
Changeset View
Standalone View
Standalone View
src/applications/almanac/storage/AlmanacDevice.php
- This file was added.
<?php | |||||
final class AlmanacDevice | |||||
extends AlmanacDAO | |||||
implements PhabricatorPolicyInterface { | |||||
protected $name; | |||||
epriestley: This is implicit; omit it. | |||||
public function getConfiguration() { | |||||
return array( | |||||
self::CONFIG_AUX_PHID => true, | |||||
self::CONFIG_COLUMN_SCHEMA => array( | |||||
'name' => 'text255', | |||||
), | |||||
Not Done Inline ActionsThis will need self::CONFIG_COLUMN_SCHEMA now to go green in Config > Database Status. Likely: 'name' => 'text255', epriestley: This will need `self::CONFIG_COLUMN_SCHEMA` now to go green in Config > Database Status. Likely… | |||||
) + parent::getConfiguration(); | |||||
} | |||||
public function generatePHID() { | |||||
return PhabricatorPHID::generateNewPHID(AlmanacDevicePHIDType::TYPECONST); | |||||
} | |||||
/* -( PhabricatorPolicyInterface )----------------------------------------- */ | |||||
public function getCapabilities() { | |||||
return array( | |||||
PhabricatorPolicyCapability::CAN_VIEW, | |||||
); | |||||
} | |||||
public function getPolicy($capability) { | |||||
switch ($capability) { | |||||
case PhabricatorPolicyCapability::CAN_VIEW: | |||||
// Until we get a clearer idea on what's going to be stored in this | |||||
// table, don't allow anyone (other than the omnipotent user) to find | |||||
// these objects. | |||||
return PhabricatorPolicies::POLICY_NOONE; | |||||
} | |||||
} | |||||
public function hasAutomaticCapability($capability, PhabricatorUser $viewer) { | |||||
return false; | |||||
} | |||||
public function describeAutomaticCapability($capability) { | |||||
return null; | |||||
} | |||||
} |
This is implicit; omit it.