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:
parent
96d831491c
commit
7456a9bc0c
1 changed files with 3 additions and 0 deletions
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue