1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-11-10 08:52:39 +01:00

Disable the "Edit Project" button for users without edit permissions

Summary: Self-explanatory.

Test Plan: Viewed the project page as a user without edit permissions and saw the link greyed out.

Reviewers: epriestley, #blessed_reviewers

Reviewed By: epriestley, #blessed_reviewers

Subscribers: epriestley, Korvin

Differential Revision: https://secure.phabricator.com/D13255
This commit is contained in:
Joshua Spence 2015-06-12 17:32:00 +10:00
parent 52f8756c3c
commit 92e868c2fe

View file

@ -91,7 +91,8 @@ final class PhabricatorProjectProfileController
id(new PhabricatorActionView())
->setName(pht('Edit Details'))
->setIcon('fa-pencil')
->setHref($this->getApplicationURI("details/{$id}/")));
->setHref($this->getApplicationURI("details/{$id}/"))
->setDisabled(!$can_edit));
$view->addAction(
id(new PhabricatorActionView())