Page MenuHomePhabricator

D12014.id28922.diff
No OneTemporary

D12014.id28922.diff

diff --git a/src/applications/auth/controller/config/PhabricatorAuthListController.php b/src/applications/auth/controller/config/PhabricatorAuthListController.php
--- a/src/applications/auth/controller/config/PhabricatorAuthListController.php
+++ b/src/applications/auth/controller/config/PhabricatorAuthListController.php
@@ -12,6 +12,8 @@
->execute();
$list = new PHUIObjectItemListView();
+ $can_manage = $this->hasApplicationCapability(
+ AuthManageProvidersCapability::CAPABILITY);
foreach ($configs as $config) {
$item = new PHUIObjectItemView();
@@ -47,10 +49,10 @@
if ($config->getShouldAllowRegistration()) {
$item->addAttribute(pht('Allows Registration'));
+ } else {
+ $item->addAttribute(pht('Does Not Allow Registration'));
}
- $can_manage = $this->hasApplicationCapability(
- AuthManageProvidersCapability::CAPABILITY);
if ($config->getIsEnabled()) {
$item->setState(PHUIObjectItemView::STATE_SUCCESS);
$item->addAction(
@@ -152,6 +154,7 @@
->setColor(PHUIButtonView::SIMPLE)
->setHref($this->getApplicationURI('config/new/'))
->setIcon($image)
+ ->setDisabled(!$can_manage)
->setText(pht('Add Provider'));
$header = id(new PHUIHeaderView())

File Metadata

Mime Type
text/plain
Expires
Sat, Nov 9, 6:38 AM (4 d, 21 h ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
6717267
Default Alt Text
D12014.id28922.diff (1 KB)

Event Timeline