~ubuntu-branches/ubuntu/vivid/phabricator/vivid-proposed

« back to all changes in this revision

Viewing changes to phabricator/src/applications/almanac/storage/AlmanacBinding.php

  • Committer: Package Import Robot
  • Author(s): Richard Sellam
  • Date: 2015-01-29 00:15:58 UTC
  • mfrom: (0.16.1) (0.15.1) (0.12.2) (2.1.4 sid)
  • Revision ID: package-import@ubuntu.com-20150129001558-na84707j70qqla7z
Tags: 0~git20150129-1
* New snapshot release
* restricted access to local config file (closes: #775479)
* moved local config file to /var/lib/phabricator (closes: #775478)
* switched mysql-server dependency to recommends (closes: #773536)
* use /run instead of /var/run (closes: #775803)
* prevent package reinstall from overwritting local changes (closes: #776288)

Show diffs side-by-side

added added

removed removed

Lines of Context:
25
25
      ->attachAlmanacProperties(array());
26
26
  }
27
27
 
28
 
  public function getConfiguration() {
 
28
  protected function getConfiguration() {
29
29
    return array(
30
30
      self::CONFIG_AUX_PHID => true,
31
31
      self::CONFIG_COLUMN_SCHEMA => array(
119
119
    }
120
120
  }
121
121
 
 
122
  public function getAlmanacPropertyFieldSpecifications() {
 
123
    return array();
 
124
  }
 
125
 
122
126
 
123
127
/* -(  PhabricatorPolicyInterface  )----------------------------------------- */
124
128
 
139
143
  }
140
144
 
141
145
  public function describeAutomaticCapability($capability) {
142
 
    return array(
 
146
    $notes = array(
143
147
      pht('A binding inherits the policies of its service.'),
144
148
      pht(
145
149
        'To view a binding, you must also be able to view its device and '.
146
150
        'interface.'),
147
151
    );
 
152
 
 
153
    if ($capability === PhabricatorPolicyCapability::CAN_EDIT) {
 
154
      if ($this->getService()->getIsLocked()) {
 
155
        $notes[] = pht(
 
156
          'The service for this binding is locked, so it can not be edited.');
 
157
      }
 
158
    }
 
159
 
 
160
    return $notes;
148
161
  }
149
162
 
150
163
 
184
197
    return new AlmanacBindingTransaction();
185
198
  }
186
199
 
 
200
  public function willRenderTimeline(
 
201
    PhabricatorApplicationTransactionView $timeline,
 
202
    AphrontRequest $request) {
 
203
 
 
204
    return $timeline;
 
205
  }
 
206
 
187
207
}