mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-16 03:42:41 +01:00
51 lines
1.2 KiB
PHP
51 lines
1.2 KiB
PHP
|
<?php
|
||
|
|
||
|
final class AlmanacDevice
|
||
|
extends AlmanacDAO
|
||
|
implements PhabricatorPolicyInterface {
|
||
|
|
||
|
protected $name;
|
||
|
|
||
|
public function getConfiguration() {
|
||
|
return array(
|
||
|
self::CONFIG_AUX_PHID => true,
|
||
|
self::CONFIG_COLUMN_SCHEMA => array(
|
||
|
'name' => 'text255',
|
||
|
),
|
||
|
) + 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;
|
||
|
}
|
||
|
|
||
|
}
|