mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-28 17:52:43 +01:00
b4d7a9de39
Summary: Instead of implementing the `getCapabilityKey` method in all subclasses of `PhabricatorPolicyCapability`, provide a `final` implementation in the base class which uses reflection. See D9837 and D9985 for similar implementations. Test Plan: N/A Reviewers: epriestley, #blessed_reviewers Reviewed By: epriestley, #blessed_reviewers Subscribers: epriestley, Korvin, hach-que Differential Revision: https://secure.phabricator.com/D10039
20 lines
433 B
PHP
20 lines
433 B
PHP
<?php
|
|
|
|
final class PeopleBrowseUserDirectoryCapability
|
|
extends PhabricatorPolicyCapability {
|
|
|
|
const CAPABILITY = 'people.browse';
|
|
|
|
public function getCapabilityName() {
|
|
return pht('Can Browse User Directory');
|
|
}
|
|
|
|
public function shouldAllowPublicPolicySetting() {
|
|
return true;
|
|
}
|
|
|
|
public function describeCapabilityRejection() {
|
|
return pht('You do not have permission to browse the user directory.');
|
|
}
|
|
|
|
}
|