mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-19 05:12:41 +01:00
Disable "Send Message" profile action if viewer is logged out
Summary: Fixes T9598. Test Plan: - Used "Send Message" as a logged-in user. - Used "Send Message" as a logged-out user. The action was disabled and clicking it popped up a login dialog. Reviewers: chad Reviewed By: chad Maniphest Tasks: T9598 Differential Revision: https://secure.phabricator.com/D14326
This commit is contained in:
parent
ad53e7b878
commit
32dc62955a
1 changed files with 3 additions and 0 deletions
|
@ -72,11 +72,14 @@ final class PhabricatorPeopleProfileController
|
|||
$href = id(new PhutilURI('/conpherence/new/'))
|
||||
->setQueryParam('participant', $user->getPHID());
|
||||
|
||||
$can_send = $viewer->isLoggedIn();
|
||||
|
||||
$actions->addAction(
|
||||
id(new PhabricatorActionView())
|
||||
->setIcon('fa-comments')
|
||||
->setName(pht('Send Message'))
|
||||
->setWorkflow(true)
|
||||
->setDisabled(!$can_send)
|
||||
->setHref($href));
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue