From db49e0fdae4d32324e623073d24adfbc6e0a4ac6 Mon Sep 17 00:00:00 2001 From: Daniel Kesselberg Date: Sun, 20 Jan 2019 21:30:51 +0100 Subject: Add canRename & name to tests Signed-off-by: Daniel Kesselberg --- settings/Controller/AuthSettingsController.php | 2 ++ 1 file changed, 2 insertions(+) (limited to 'settings/Controller') diff --git a/settings/Controller/AuthSettingsController.php b/settings/Controller/AuthSettingsController.php index 46ef21cb2c6..b1016fb4a39 100644 --- a/settings/Controller/AuthSettingsController.php +++ b/settings/Controller/AuthSettingsController.php @@ -118,6 +118,7 @@ class AuthSettingsController extends Controller { $data['canRename'] = $token instanceof DefaultToken || $token instanceof PublicKeyToken; if ($sessionToken->getId() === $token->getId()) { $data['canDelete'] = false; + $data['canRename'] = false; $data['current'] = true; } return $data; @@ -155,6 +156,7 @@ class AuthSettingsController extends Controller { $deviceToken = $this->tokenProvider->generateToken($token, $this->uid, $loginName, $password, $name, IToken::PERMANENT_TOKEN); $tokenData = $deviceToken->jsonSerialize(); $tokenData['canDelete'] = true; + $tokenData['canRename'] = true; $this->publishActivity(Provider::APP_TOKEN_CREATED, $deviceToken->getId(), $deviceToken->getName()); -- cgit v1.2.3