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

Tokens - make action disabled if user not logged in

Summary: ref T2691. These actions should be visually disabled if user not logged in consistently. Tokens was the odd one out, staying active regardless of user status.

Test Plan: viewed a mock logged out and verified "give token" was inactive from a UI-sense

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Maniphest Tasks: T2691

Differential Revision: https://secure.phabricator.com/D6385
This commit is contained in:
Bob Trahan 2013-07-08 17:05:46 -07:00
parent 96d831491c
commit 7456a9bc0c

View file

@ -54,6 +54,9 @@ final class PhabricatorTokenUIEventListener
->setName(pht('Rescind Token'))
->setIcon('dislike');
}
if (!$user->isLoggedIn()) {
$token_action->setDisabled(true);
}
$actions = $event->getValue('actions');
$actions[] = $token_action;