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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user